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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
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 ...
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. ...
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 ...
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 ...
4
votes
Accepted
Why is pgr_dijkstra not giving shortest path
Even though you have instructed to use an undirected graph, you must still use set a cost and a reverse_cost (which can be the same).
SELECT gid as id, source, target,
length:: double ...
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, ...
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 ...
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 ...
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 ...
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 ...
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.
3
votes
Seeking a GIS for indoor mapping and direction finding
And very recently, OpenIndoor has released its first 3D indoor rendering solution for OSM data.
You can drag and drop your GeoJSON file into the web app to check the result.
https://app.openindoor.io
3
votes
Seeking routing libraries in R?
Together with the stplanr authors I started some work on this in https://github.com/edzer/spnetwork , but I'm not so sure this is helpful - we stopped developing it at some stage, mostly because ...
3
votes
Accepted
OpenTripPlanner (Error: 406) No transit times available
The problem occured because the GTFS data from: https://code.google.com/archive/p/googletransitdatafeed/wikis/PublicFeeds.wiki are out of date. Which also can be seen in the GTFS Feed Validater:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
routing × 579pgrouting × 112
openstreetmap × 85
qgis × 80
postgis × 77
network-analyst × 69
arcgis-desktop × 58
leaflet × 41
network × 37
osm2po × 33
postgresql × 31
software-recommendations × 27
distance × 19
algorithm × 19
open-source-routing-machine × 17
python × 15
api × 15
navigation × 15
javascript × 14
transportation × 14
arcmap × 12
google-maps × 12
open-source-gis × 12
route × 12
osm2pgrouting × 12