Hot answers tagged

46

GPS Visualizer will take a Google Map route (url) and convert to .gpx "You can ignore most the options, just select Gpx and paste the Google Maps URL into the box labelled “provide the URL of a file on the Web” and then press the Convert button" http://www.gpsvisualizer.com/convert_input Guide http://bedsforcyclists.co.uk/articles/2014/04/13/how-...


17

To export a route to KML you'll have to use Google MyMaps. add a route to new or existing layer drag and drop the route to suit your needs Open the maps options menue (3 dots above the layers) Export to KML You can then use any service to convert the KML to GPX. I prefer GPSies. (edit: now acquired by AllTrails)


10

Just to close this loose end, since I asked the question a new package was released called osmar which contains a vignette of how to implement shortest path algorithms in R using Open Street Map data: http://osmar.r-forge.r-project.org/ . It uses the function get.shortest.paths from the igraph package. Excellent article on this can be found here: http://...


10

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 to your map for the travel times you require (e.g. 10, 20, 60 minutes) and for the following travel modes: walk, bike, car, transit. There are quite a few ...


10

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 (either time/length). It'll create a new line layer with a field called cat added, which will be the id of the nearest facility. Here's an example based on walking ...


8

It may seem like laziness on the part of Watershed tool developers to stick with the simplest and oldest flow algorithm, D8, but there is a very sound reason for doing so. The difference between the D8/Rho8 flow algorithm and the more advanced algorithms that you mention (e.g. D-infinity) is mainly in their inability to represent the dispersion of overland ...


8

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. Someone had a similar issue just a month ago: https://github.com/perliedman/leaflet-routing-machine/issues/13 I'm quoting perliedman, the creater of the routing ...


8

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 the argeparse/os.getenv and hardcode the connection if you wanted. import argparse from os import getenv import psycopg2 parser = argparse.ArgumentParser() ...


7

You can use GraphHopper for that task, which also supports different mode like walking or biking and uses OpenStreetMap per default. You'll need some Java coding which explores the road network from the starting point similar to how the Dijkstra algorithms works but then you can get something like the following even in real time (<0.5s): The code will ...


6

osrm-isochrone is a small node.js library for generating drivetimes.


6

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 offers multiple processing algorithms that produce origin-destination matrices (OD-Matrix) as line layer, table or csv file out of the box. All algorithms rely ...


6

GraphHopper (using OpenStreetMap Data) GraphHopper offers memory efficient algorithms in Java for routing on graphs. E.g. Dijkstra and A* but also optimized road routing algorithms like Contraction Hierarchies. It stands under the Apache License and is build on a large test suite. OpenStreetMap is directly supported from GraphHopper. Without ...


6

ST_StartPoint() only accepts LineString as input. You'll have to strip your table down from MultiLineString to LineString, either by taking only the first element up each geometry ALTER TABLE foo ALTER COLUMN geom TYPE Geometry(LineString,4326) USING ST_GeometryN(geom,1) Or, more correctly, dumping the multis out, in case there are legit multis. ...


6

As far as I know it's not possible to solve for alternate routes without some additional input or change to the analysis. In a network, given a particular impedance, there is only one shortest route between two points. As soon as you start looking for alternates without any additional input you've essentially removed the 'shortest' constraint and are back to ...


6

As an answer to both Uffe Kousgaard comments about "what the 18GB file contains" compared to a routable shapefile, and a possible answer to this question: You don't explicitly state it, but I guess you used the ArcGIS Editor for OpenStreetMap to convert your data. If not, I really recommend to have a look at it, as it contains a dedicated option to create ...


5

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. It is free and open source and coverage is pretty good. You can find a lot of different tutorials on how to use it on the website.


5

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 documentation there is a price list, where a "simple route" currently costs $0.004 per route. Could not locate a free option. HERE maps would appear to have 250K ...


5

QGIS has all the algorithms necessary, but there is no GUI to create matrices yet. With some Python knowledge the Network Analysis library documentation should get you started.


5

I've written a routing script for QGIS Processing based on the core network analysis library. It expects a point layer and a network layer as input and returns a route between the points. To add the interactive aspect you describe, you'll have to extend the code.


5

ESRI have a new tool that allow to add GTFS to a Network Dataset, display GTFS Route Shapes, edit GTFS Stop Locations, calculates transit/walking service areas for a specific time of day and day of the week, and more effective gadegets. There is also a blog avout this tool with samples to each procedure a lot of more links


5

Yes, you can do this with pgRouting. As a starting point I would recommend you to look at the pgRouting Workshop. Most efficient for your case might be the one-to-many shortest path funtion named kDijkstra. You could import your node-pairs into a PostgreSQL database or just write a small application that reads the CSV file and then runs the SQL queries. ...


5

I can answer the 2nd part of your question, the first one has me a little tied up now too I'll edit if no one answers when I get my head around it. So for 2) just use something in the line of routeControl._routes[0].summary.totalDistance See if this works, also _routes[0] represents your choice for example if you have another routing option for which you ...


5

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 routable graph for import into PostGIS. From there, you can export in a format that you can feed into ArcGIS.


5

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 library that can be used to run queries programmatically. I don't know if English manual for it exists, here is Google Translated description of this library ...


5

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 (Vector > Geoprocessing Tools > Intersect): Load the Spatial Query plugin (you may need to download/install this from Plugins > Manage and Install Plugins): ...


5

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 the osm2po default config file I use to generate the graph. The problem Somewhere (line 188, if you are using osm2po 5.1.8) in the default config file, there ...


4

In case someone comes years later (like me), 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 seen in the IGC Data Example const map = new ol.Map({...}); const vectorSource = new ol.source.Vector({...}); map....


4

In order to show isochrones (Travel Time Map) and isodistances you can try the iso4app service. This service currently is available for over 50 countries: North America, Central America,South America, Europe, Russian Federation (European part), China and Australia. You can use isolines with Leaflet or Google Maps Support for walk, car, bike isolines ...


4

If your objective is to develop a routing program over the sea returning various maritime routes from (origin,destination) pairs, you should rather rely on a linear mesh covering the seas, instead of polygons. I had exactly the same goal and I did something using: The shipping lane dataset "Oak Ridge National Labs CTA Transportation Network Group, Global ...


4

You have not specified any mobile platform so i am answering here for the most popular android platform. If you want to render the map in android device you can then use mapsforge library. There is a plugin for osmosis called mapwriter that will help you convert the .osm data into .map data which can be rendered using the mapsforge library. .map is a binary ...


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