New answers tagged

0 votes

Infinite run after adding osm service in a map content and using the paint method of the StreamingRenderer class

The problem seems to be that you are asking for an area the size of millions of Earths across, so it takes a long time to calculate all the possible (empty) tiles that need to be requested from the ...
user avatar
  • 74.6k
0 votes

Toggle dark mode on and off using on and un in OpenLayers

As mentioned in this answer the problem I had was that I was reassigning the function each time and therefore un was not matching it to the binded signature of the on listener.
user avatar
  • 11
3 votes
Accepted

Applying filter on local OSM PBF file

Testing a filter on OSM layers results in this error, but the filter runs okay when you hit OK. I notice OSM layers also don't display the number of features when you select "Show Feature Count&...
user avatar
  • 51.1k
1 vote

Extracting admin boundary data from OpenStreetMap

It depends how many boundaries you would like to extract from OSM. For single city shape osmnx would be easiest option. If you need to get admin boundaries for whole country, processing OSM data dump ...
user avatar
1 vote
Accepted

Overpass API return different results between Overpass Turbo export and wget

It seems you forgot to include the union statement (the two round brackets) in your second example. They're necessary to include nodes, ways, and all nodes referred to by ways in your response. If you ...
user avatar
  • 3,820
0 votes

Download OpenStreetMap relation data as shapefiles

append "full" at the end of the link and the XML result contain coordinate tags for instance: https://www.openstreetmap.org/api/0.6/relation/7673622/full
user avatar
  • 612
4 votes

OSM Overpass query along track from QGIS

In addition to the answer of @mmd you can use the following python code to create the around statement. Just import the GPX as a feature layer and select one single line. # Get selected feature layer =...
user avatar
  • 673
5 votes

OSM Overpass query along track from QGIS

You need to use the Overpass QL around statement along with a list of lat/lon pairs. More details are also available in the Overpass QL documentation: https://wiki.openstreetmap.org/wiki/Overpass_API/...
user avatar
  • 3,820
1 vote
Accepted

Modifying openstreetmap-carto style to preference English labels

You would have to use the COALESCE function every time a name is requested in the sql of the project.mml. E.g. for country_names (see https://github.com/gravitystorm/openstreetmap-carto/blob/master/...
user avatar
  • 336
1 vote

After pgr_createTopology, how should I use pgr_dijkstra?

Like explain in the documentation the pgr_dijkstra function need the following parameters : Edges SQL : A string that represents a SQL query for extract the edges from your edge_table. start_vid : An ...
user avatar
  • 1,237
0 votes

Cutting holes in custom polygon made with Leaflet.Draw

This did the trick for me! //making a hole in global_mask json layer using key_state json key_state_json.geometry.coordinates.forEach(element => { if (key_state_json....
user avatar
  • 1
0 votes

Distance between two points on OSM without routing information

I would give a shot to https://pgrouting.org/docs/tools/osm2pgrouting.html Download OSM data and import into postgis Execute pgRouting routines. Seems simpler, but I haven't tried it myself only ...
user avatar
1 vote
Accepted

Osm2pgsql error: authentication method 10 not supported

You are using a fairly old version of osm2pgsql, which includes an even older version of libpq (like v 9.6). This version does not allow connecting to a postgres instance (PG10+) configured with the ...
user avatar
  • 34.3k
3 votes
Accepted

Getting osm_id from random point with OpenStreetMap database

Use the 2D distance operator <->: SELECT way, osm_id FROM planet_osm_line AS osm ORDER BY osm.way <-> 'SRID=3857;POINT(-3890646.5744145643 -899377.0801662721)'::GEOMETRY ...
user avatar
  • 23.1k
0 votes

Issue with extracting certain OSM features using Overpass Turbo and QGIS

You could consider creating centroids from the polygon layer - first select those that do not have any pub features within the polygons (to avoid duplicates). You probably know how to do that but if ...
user avatar
0 votes

Issue with extracting certain OSM features using Overpass Turbo and QGIS

You can convert the polygons to points - either just for visualization, styling the polygons as points using Centroid Fill, or extracting the centroids from the polygons using Menu Vector > ...
user avatar
  • 40k
1 vote
Accepted

OSM pbf from Geofabrik call with bounding box

If your aim is to download less data I don't believe it is possible but the whole .pbf file is downloaded in any case, but you can avoid using temporary files by piping the output of wget to ...
user avatar
  • 51.5k

Top 50 recent answers are included