Hot answers tagged

10 votes

Which tools and methods can be used to create isochrones?

You could have a look at the Targomo API (formerly Route360˚), a pretty simple but powerful JS library which you can use with Leaflet (or even Google maps if you like). It adds travel time polygons ...
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.3k
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,759
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

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

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,375
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
  • 29.3k
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
  • 29.3k
5 votes

Looking for free web service that calculates driving distance between 2 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

Creating drive time polygons using Open Source tools?

You might want to check out the open Route360° JavaScript API, which works with both Leaflet and Google maps. It returns travel time polygons for the following travel modes: walk, bike, car, transit. ...
5 votes

Creating network datasets from OSM data in QGIS?

QGIS cannot convert OSM data into a routable graph. There are other tools which specialize on this task: osm2pgrouting open source osm2po free but not open source Both convert OSM data into a ...
underdark's user avatar
  • 83.8k
5 votes

Creating network datasets from OSM data in QGIS?

Assuming you have ArcMap and a Network Analyst extension (as mentioned in your question) it is possible to use OSM data for routing without using qgis. The most important is that you need to generate ...
zehpunktbarron's user avatar
5 votes
Accepted

Simple node to node routing in QGIS

You can try RoadGraph plugin/Network analysis library. If you have two layers (they should be properly snapped): Set some settings Select point Start and Stop Calculate This plugin is based on a ...
Maxim Dubinin's user avatar
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
  • 83.8k
5 votes

How to find and delete all road unattached road segments

For QGIS, you could try the steps below. I used QGIS 2.12.3-Lyon and have a "road" line shapefile, the isolated road in the red circle is what we're trying to remove. Intersect your layer on itself (...
Joseph's user avatar
  • 75.3k
5 votes

How can I know why an OSM way cannot be used for routing, and how can I fix it

Ok, I am sorry about me answering my own question. I guess I had to ask the question to think about it more and be able resolve the problem. It turns out the problem was not in the OSM data but with ...
Pierre-David Belanger's user avatar
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
  • 40.8k
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,375
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.6k
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
  • 67.2k
4 votes

OpenTripPlanner rest api request

I am pretty much in the same boat as you but I think I have figured out how to create an isochrone. I am using version 0.18.0, not sure if that is relevant or not. Here is where I found the example ...
Ravi Mehta's user avatar
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
  • 576
4 votes
Accepted

Leaflet Routing Machine: how to initialise map without waypoints loaded?

The problem is that you are not initializing your map completely. The routing machine sets the map view for you when you give it waypoints, but without them, you need to tell the map where to start ...
nathansnider's user avatar
  • 2,091
4 votes
Accepted

Leaflet Routing Machine: how to export route details and coordinates in JSON / GeoJSON?

You can access the instructions (that is, the turns etc.) by attaching a listener to your Routing.Control for a routeselected event. This will return a RouteSelectedEvent with an IRoute object inside ...
nathansnider's user avatar
  • 2,091
4 votes
Accepted

How can I know why an OSM way cannot be used for routing, and how can I fix it

Indeed, the default.config is very strict and to be honest it's too strict for my taste. I stumbled across a similar question weeks ago and modified the osm2po release notes for 5.1.0 to report this ...
Carsten's user avatar
  • 3,318
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,091
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,873
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,237

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