Tag Info

Hot answers tagged

4

I think you need to build another table that defines all the routes in is as combinations of other routes. Then you query this table and join to the actual routes to get the geometry. If the query is for 'from station' to 'to station' and each section has a 'from station and 'to station'. But you want to include routes that take in multiple sections, you ...


3

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 ...


3

I've had a lot of success with the Mapsforge library. They have writer that is a plugin to osmosis. They have a Compact file format for fast on-device rendering of OpenStreetMap data. There is an aligned project for routing, Graphhopper, which I've found to be quite user friendly.


3

The FerryDurationResolver is absolutely correct. Good work! But you can make things easier. I assume you are using Eclipse. Then just create a new project. Add osm2po.jar as library and create a new Run-Config. Develop the FerryDurationResolver as usual. Debugging is possible. When everything works as expected, just create a jar-file using Eclipse's ...


3

I have succeded in creating a WayTagResolver that parses the duration and puts it into the osm_meta column. I therefore share the solution here, for others to use this or deveelop futher on it. Download osm2po In the plugins folder, extract osm2po-plugins-4.7.7-src.zip Enter the extracted folder, and STAY there :) Create a java file for storing the ...


3

We are working on a very similar problem at the moment and have been using a different approach. We loaded all of our data into a PostgisS enabled PostgresQL database and used the data to construct a node/vertice network which is then snapped to the road network. We then installed pgRouting and used the pgr_tsp function to create our recommended route. The ...


3

OSRM has an routing API that can do that. You can find the documentation for the API here. But you have to put them in the order of appearance beforehand. To route via certain coordinates list them in the query string in the order of appearance (currently limited to 25 max points and to vehicle routing only): ...


2

I have recently implemented a similar thing. You need a routable road graph. Have a look at underdark's tutorial on using PGRouting on OSM data. It will tell you how to set up a routable graph. Once you have the routable graph you will have a set of nodes and a set of roads. The nodes correspond to the start and end points of the road lines. As your ...


2

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: ...


2

The following code is part of a Python toolbox for 10.1. The Scale parameter is used to set the scale for panning and the Scale Factor parameter can be used to slightly zoom out (or in, though that's not really useful) so that some of the surrounding area is captured. from os.path import join shpin,field,pan,scale,factor,folder = ...


2

If you want to use ESRI Technology you'll need network data set at your data base. The second important component is server and a application for this You'll need ArcGIS Server to publish it to the internet. and a website.


2

id2 59721224 for example is the edge that connects vertex IDs 2 and 3. That's why the last record has a value of -1. Edge ID is the id you specify in the first argument (SQL query) of the pgr_dijkstra function. In your case it's the gid of the table named wp_norway_network1. Because pgr_dijkstra requires the column name id, you had to write gid AS id.


2

Yes. osm2po provides two Router-Families. The DefaultRouter belongs to the first one, which is only able to route from link to link (Vertex-IDs). All Routers with an "Ovl" in their names are not restricted to it. They all base on a second virtual OverlayGraph which extends the static network. In order to find a virtual point (source and target) on the ...


2

You might want to look at OpenTripPlanner. There's an instance set up here that includes the MTA GTFS feeds. It was built with the transit index included, which can be queried via its API to find the nearest stops. The API can also be queried to plan trips. An example query, to find stops near a point: ...


2

You just need to execute desired shortest path algorithm twice, first from 1 to 2 and second from 2 to 3.


2

Calculate the distance to all origin points, select the 90% nearest and then do a convex hull calculation to get the catchment area. Exact steps depend upon your software.


2

I assume that you did a copy parallel equally on the left and the right of your original roads. So, in order to clean up a bit, you could create a buffer polygon of the same size and dissolve all the boundaries. Because you have advanced licence, you can set up flat ends, it will be nicer in your case) Use "feature to line" with your lines in order to ...


2

You should use id3 of the result instead of id2 because id3 is the edge id according to http://docs.pgrouting.org/dev/src/ksp/doc/index.html


2

What you are looking for is called 'reverse geocoding' and is implemented e.g. with Nominatim API


2

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 ...


1

I ran into the same problem this week, and eventually installed QGIS 1.8 (didn't even need to uninstall 2.0). In v1.8, Road Graph exported my shortest path results to a shapefile just fine, which I was then able to use in 2.0.


1

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


1

thank you for choosing OSM to realize that project :) Sadly our strength is creating a map and communication/docs is still WIP. Please understand, that OSM is a geodatabase and thus it can be used in very different ways to create services and offer this data offline. I say this to make clear e.g. that there is an API, but that isn't tuned for your specific ...


1

You could create a point C, halfway between A and B. Calculate cost from A-C and C-B. Depending upon how far it is from your desired cost, adjust location of C to either side and try again. And depending upon how accurate you want it and how complex your graph is, it could take quite some tries to get it correct.


1

Conceptually, I would close the link with failed asset and then route between the nodes at each end of the link. Finally: detour_distance = route_distance + length_of_closed_link.


1

Don't get stuck in finding the absolute optimal planning. The mathematical problem is a hard nut to crack. You'll probably be happy with a 95-99% good solution to start with, from my personal experience as a operations research consultant. You could start off with clustering locations into several groups, each group representing a day of work. You may want ...


1

You probably should pick a tool for that and follow the schema the tool forces (for example pgRouting). If you want to do it without a table you only need two tables really to store the vertices and the nodes. The trick is your image shows a spatial approach while in fact you need a temporal one (image pending). The bus doesn't go from node A to node B. ...


1

Ended up finding what I was doing wrong, my input stops were: 38.868047,-9.106938;38.630616,-8.915192 after changing to -9.106938,38.868047;-8.915192,38.630616 it works as expected, but still I don't understand why they are reversed in ArcGIS, Google Maps expects them in the way I was inputting them before.


1

Theoretically it is possible to let osm2po handle timetables, even for ferries. Everything is prepared for it. Nevertheless, you need some basic understanding of the Java-API. The default config is shipped with a very pragmatic approach. Namely, givin a ferry the same impact as e.g. an ordinary street in shape of its maxSpeed. The duration, your are asking ...



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