New answers tagged

1

I eventually managed to resolve this. My problem came from the fact that I had installed mapnik via pip install mapnik. That installs a very old version of mapnik that doesn't work with the most current version of openstreetmap-carto. I eventually managed to get it to run with the following parameters to main of 'generate_tiles.py': if __name__ == "__main__"...


0

Kind of solved it. Had to use QL instead of XML to get it to work but here is what I used: import requests import overpass api = overpass.API() s = 12 w = 34 n = 56 e = 78 data = api.get('way(' + str(s) + ',' + str(w) + ',' + str(n) + ',' + str(e) + ')["highway"!~"footway"]' + '["highway"!~"pedestrian"]["highway"!~"path"]' + ...


0

Never mind. The problem lies with the operator. Helps if you take the loopback address out of the code and actual put the correct server address in. Thanks


1

Shaded Relief or Hillshade is done from a digital elevation model. You build raster tiles. I've done this with ASTER 2 GDEM and from SRTM. There are tons of methods of accomplishing this however, I find Global Mapper to be the easiest, simplest workflow and fairly quick. Otherwise, use QGIS. Vector Tiles stylesheet is modified to include the raster tile URL ...


0

If it's a one-off and the file is small enough to be loaded in JOSM, one of the more popular OSM editing tools, this might be the easiest option. Use JOSM's search function (Edit > Search, or Ctrl+F) to select the correct features and edit them all at once. In your example, the search query would be highway=unclassified cycleway=*. For large files, and as ...


0

This website can give you the correct info; http://osm2shp.ru/ it might be outdated (2016), but it will give you all the hospitals using amenity_pnt and all the ambulance stations using emergency_pnt. You can then import it into QGIS and filter it.


1

Here's an alternative to splitting the streets at their intersections and converting them into polygons. I don't know if this method is better, but I do think it's interesting to consider different ways of approaching a problem. Basically, we create a large polygon, and use the streets to split up that polygon. Create a large "background" polygon, eg ...


2

There is ST_Node & ST_Polygonize, which should do what you need: SELECT (ST_Dump(ST_Polygonize(ST_Node(multi_geom)))).geom FROM ( SELECT ST_Collect(<geom>) AS multi_geom FROM <your_table> -- WHERE <condition> -- GROUP BY <attribute> ) q ; You might want to use a filter and/or grouping attribute to put a limit on the ...


1

it seems like you need to create blocks based on street intersection? you can run the intersect tool in arcmap and set the output type as point. this will give you the points of each intersection. however, by using streets to create polygons, you can set a buffer around the streets between 30-40ft and dissolve by name of street. This will give you ...


0

OSM does not display relations. relations are not geographical objects and cannot be dispalyed as is, so only the members are displayed. to convert relation to nodes and use you can use overpass-api. e.g. here and here


0

Your underlying assumption that the members of a (route-)relation are ordered is not correct. The quote in the API doc simply means that the order in which you provided the member elements will be maintained. This should not be a surprise as the API does not and cannot know the semantics (for example in which way it should be ordered) of a specific relation ...


1

The query in your question looks for the road name. "I 55" and "I 270", however, are modeled in OSM using the ref tag because they aren't really names. You need to modify the query accordingly: way[highway][ref="I 55"];node(w)->.n1; way[highway][ref="I 270"];node(w)->.n2; node.n1.n2; out meta; This won't return any results, though. The on/off ramps ...


0

You can try osmtogeojson (used by overpass turbo) or one of the alternatives listed at the GeoJSON OSM wiki page. Unfortunately I have no experience with any of them and I'm unsure which one supports sorting of relation members.


0

GeoJSON polygons are allowed to have holes, and Osmium does in fact support this. So you could construct a polygon where ... ... the outer ring is large enough to contain all the data in the original file ... the inner ring is the boundary of the city you want to exclude. Running osmium extract with that polygon as the -p parameter would remove data ...


0

You can use mapbox tiles and extract features from it using Get all the layers having "type":"symbol" Define a bounding box var bbox= [[x,y] ,[x,y]]; Query features from tiles with layer having all the layer extracted from step 1 var features = map.queryRenderedFeatures(e.point, { layers: ['place-town'] }); refer https://docs.mapbox.com/mapbox-gl-js/...


1

What I did when I needed to sample the spectral profile of a web map layer was to right click the layer, export the Raw Data to GeoTiff, choose an appropriate extent, and set an appropriate resolution for the layer (it likely will not set a value other than 0, which will yield a failed export). Then, you do you work off this rendered image. Not ideal, but ...


0

This is what I found: <!-- Only select the type of ways you are interested in --> <query type="way" into="relevant_ways"> <id-query ref="156810827" type="way"/> </query> <!-- Now find all intersection nodes for each way independently --> <foreach from="relevant_ways" into="this_way"> <!-- Get all ways which are ...


1

One possibility of doing this would be with the help of turf.js library. When adding newly drawn polygon, algorithm for detecting and creating possible holes goes like this: Convert newly created layer/polygon to GeoJSON and then to turf geometry. Iterate through all existing layers/polygons. Convert each layer/polygon to turf geometry and check if it ...


5

OSM usually doesn't contain the exact outline of a junction or intersection (except in very few cases where area:highway has been mapped) and most roads don't have a width set. However you can try to estimate it by looking at the highway class (i.e. primary, secondary, tertiary...) and the number of lanes.


Top 50 recent answers are included