Skip to main content
10 votes
Accepted

Computing areas of influence using QGIS

the grass algorithm v.net.alloc can produce the subnets - you can call it from the Processing toolbox (tested in QGIS 2.16) You'll need a point layer (for facilities) and a lines layer with costs (...
Steven Kay's user avatar
  • 20.5k
9 votes
Accepted

Leaflet routing control change marker icon

The issue is that the createMarker function is called for every waypoint, so obviously the resulting markers will look the same. To work around it, you simply use the arguments that you already have. ...
Senshi's user avatar
  • 1,767
8 votes
Accepted

pgr_createTopology with large datasets

The following is what I am using. Some of it is specific to our deployment environment since we are using docker and some bash scripts to deploy and set up the server. You could easily get rid of all ...
James's user avatar
  • 326
7 votes
Accepted

Routing with several stops using QGIS

The solution requires some basic usage of PyQGIS. This code computes paths for every subsequent pair of points using the order specified in the "order" field. Then all the paths are merged ...
Leon Powałka's user avatar
6 votes

How to create an OD road distance matrix in QGIS?

UPDATE - QGIS3: Since this seems to be an important topic, I would like to share my answer on a similar question. If you are using the current version of QGIS (3), you can use the plugin QNEAT3. It ...
root676's user avatar
  • 2,385
6 votes

Getting feature that lies closest to point in OpenLayers

The solution is much easier nowadays. ol.source.Vector has a function getClosestFeatureToCoordinate(coordinate, opt_filter) to find the closest feature to a given coordinate. A great example can be ...
dube's user avatar
  • 161
6 votes
Accepted

pgr_dijkstra is considering one-way streets as bidirectional

You are passing in the metric length ST_Length(geom::GEOGRAPHY) of each edge E as both cost & reverse_cost - rendering it equal to to the undirected counterpart. pgRouting realizes ordered graph ...
geozelot's user avatar
  • 30.4k
6 votes

Calculating cost values in pgRouting using ST_DWithin

You should simply UPDATE utrecht_osm_foot_2po_4pgr_duplicate SET cost_greenery = cost / 1000 WHERE ST_DWithin(geom_way, osm_meta, 30) ; If no update happened make sure your geometries have a ...
geozelot's user avatar
  • 30.4k
6 votes
Accepted

Phantom points in QGIS do not dissapear

These are called "text annotations" and are part of the annotations introduced with QGIS 3.22: https://docs.qgis.org/3.34/en/docs/user_manual/map_views/map_view.html#annotation-tools Click ...
MrXsquared's user avatar
  • 34.9k
5 votes

Looking for free web service that calculates driving distance between two addresses

A slight update a few years down the line, since I'm looking for the same thing: The ESRI link above no longer works, but gives the option of proceeding to http://route.arcgis.com. Under the API ...
MiRin's user avatar
  • 51
5 votes

Shortest path from points in one layer to points in another layer via roads in QGIS

You'll need some Python scripting because there is currently no GUI solution for this issue. To get you started, have a look at my point layer to route script for Processing which is based on the ...
underdark's user avatar
  • 84.3k
5 votes
Accepted

pgrouting with oneway

You would need to prepare your data beforehand. Add cost and reverse_cost columns to your ways_noded table. Then, you populate them using the way length if usable in this direction, or an insanely ...
JGH's user avatar
  • 42.3k
5 votes
Accepted

QGIS QNEAT3 AttributeError by creating isodistances/isochrones

You should once again think about the parameters you chose. QNEAT3 uses an interpolation raster for creating the isochrones on a network. You chose a cell size of 1000x1000m and entered a contour ...
root676's user avatar
  • 2,385
5 votes
Accepted

Interactively create route that snaps to route layer in QGIS

QGIS has en editing tool call Automatic tracing. Here the documentation section of this tool : Enable the Tracing tool (in the Snapping toolbar) by pushing the icon or pressing T key. Snap to a ...
J. Monticolo's user avatar
  • 15.8k
5 votes

Interactively create route that snaps to route layer in QGIS

Expanding the solution by @Dror Bogin you can use this expression together with array_foreach() to include not just two points, but any number of points - in the following example points 1 to 9 (first ...
Babel's user avatar
  • 73.1k
4 votes

Shortest path from points in one layer to points in another layer via roads in QGIS

I had a very similar problem, finding the amenities (restaurants etc) within a certain distance by road from access points along a bike path. I solved it with the toolbox script shown below, which is ...
Don's user avatar
  • 586
4 votes
Accepted

Leaflet Routing Machine: how to dinamically change router settings?

To change the vehicle type, you would use: control.getRouter().options.urlParameters.vehicle = 'foot'; However, the router does not automatically recalculate the route when you change the parameters,...
nathansnider's user avatar
  • 2,161
4 votes
Accepted

OSM table(Matrix) Api returning distance 0 for small routes

You need to swap the coordinates, Lat in place of long and long in place of lat as below: http://router.project-osrm.org/table/v1/drive/72.5024,22.9755;72.5647,23.0143;72.4796,23.0483?sources=0
Shiko's user avatar
  • 2,893
4 votes

pgr_createTopology with large datasets

Thank you @James for sharing this. It helped a lot. For those of you who want to rebuild the whole topology: normally, this is achieved by clean:=true. Since the ways table gets processed step by ...
KGolbang's user avatar
  • 141
4 votes
Accepted

Improving our spatial data by calculating "Close to Coastline", "Close to Park", "Close to Stadium" etc

In your case I think the easiest sollution is to use the algorithm 'Distance to nearest hub'. This can be found under processing > processing toolbox. This algorithm works best from point to point. ...
PieterB's user avatar
  • 5,287
4 votes
Accepted

With leaflet-routing-machine, how to bring a route on top?

Final solution is quite simple but was very hard to come by. Every element displayed on Leaflet map is placed in one of the standard map panes, which are DOM elements used to control the ordering of ...
TomazicM's user avatar
  • 26.3k
4 votes

Why pgr_dijkstra() only finds the routes that are pretty straight?

My problem is solved by the solution that wfgeo and ThingumaBob gave me. I changed the query as: select * from pgr_dijkstra('select id , source, target, cost FROM q_roads', 10237, 10551, false) in ...
milad's user avatar
  • 729
4 votes

Calculating cost values in pgRouting using ST_DWithin

Try maybe this: UPDATE utrecht_osm_foot_2po_4pgr_duplicate SET cost_greenery = ( CASE WHEN ST_DWithin(utrecht_osm_foot_2po_4pgr_duplicate.geom_way, ...
Taras's user avatar
  • 33.3k
4 votes

Interactively create route that snaps to route layer in QGIS

It isn't clear from your question what you tried so far. You could use the QGIS native shortest path algortihm which will find your path using a lines layer as a road network. If you just want get a ...
Dror Bogin's user avatar
  • 3,555
3 votes

Building a graph from OSM?

http://osm-traffic.com/ allows direct download of graph data from OpenStreetMap in json format. Disclaimer: I work with the company who developed, it might become a pay service.
Peter's user avatar
  • 61
3 votes

How to import OpenStreetMap data into GraphX?

Checkout this tool that converts OSM PBFs to Parquet files: https://github.com/adrianulbona/osm-parquetizer .. and the following blogpost containing a demo where Spark is used to reconstruct Way ...
Adrian Bona's user avatar
3 votes

Export Google Maps Route to KML/GPX

This is what worked for me (example for biking route, can also be used for car route): Open http://google.com/mymaps Create a new map Click "Draw A Line Icon" and select "Add Biking Route" (a new ...
XPloRR's user avatar
  • 131
3 votes

Which tools and methods can be used to create isochrones?

Disclaimer: I work for iGeolise To model travel times you can use the TravelTime platform API. It uses a range of transport and map sources to produce travel time isochrones including ATOC, DFT, TFL ...
3 votes

Identifying missing sidewalks in OpenStreetMap data

I created a pretty good "missing sidewalk map" for the City of Bloomington, Indiana. In this case they had performed a LIDAR scan of every City street and had a complete map of all the ...
Mark Stosberg's user avatar
3 votes
Accepted

How to use offline routing Dijkstra in javascript?

If anyone is still looking for an answer to this problem I made a little tool to get the shortest path using dijkstra algorithm in OL3 here first you create the network based on the feature ...
Hicham Zouarhi's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible