Tag Info

Hot answers tagged

7

I have just the same problem and was about to ask on mailing lists, so thanks to everybody! I am using Shooting Star with a million and a half rows on the routing table. It takes almost ten seconds to calculate it. With 20k rows it takes almost three seconds. I need Shooting Star because I need the turn restrictions. Here are some ideas I'm trying to ...


7

When faced with tasks like this your primary objective is to be rational. Don't change params based on 'gut feeling'. While the gut seems to works for Hollywood it does not for us who live in the real world. Well, at least not my gut ;-). You should: establish a usable and repeatable metric (like the time required by a pgrouting query) save metric results ...


6

A LINESTRING object consists of one and only one line with n vertices. A MULTILINESTRING object consists of 1 to m LINESTRINGs. In case of a routing network, it's not obvious to me why MULTILINESTRINGs would be used. If you plan to use pgRouting's shortest path function, the geometries are irrelevant anyway since it only needs source and target vertex ids ...


5

We have just created a branch in git for a turn restricted shortest path @ https://github.com/pgRouting/pgrouting/tree/trsp Sorry no documentation yet, but but if you ask questions on the pgRouting list I hang out there and will respond. This code runs much faster than shooting star and is based on Dijkstra algorithm. -Steve


4

Is it possible to load the global routing data into PostGis? What can I expect from a performance point of view? It's for routing purposes only. Yes, it's possible to load global data in the database, but it is probably not possible to run long-distance routing requests if you expect a reasonable response time. But you can make routing queries that clip ...


4

If you are still open for other suggestions, I'd recommend osm2po instead of osm2pgrouting because in my experience it works without size limitations. It's also very easy to install. I've written a short how-to part 1 & part2 a while ago. I've also written a guide on installing pgRouting on Windows which should help you install the binaries you ...


3

There is no error in your osm2pgsql output. It only gives a notice that it creates a vertices table with a serial column. When the routing result looks fine, then the import and topology went well. You probably should check if you imported all ways you want to use and adjust the configuration file accordingly. For multi-modal routing though (if you care ...


3

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


3

Yes, we have just implemented a turn restricted shortest path (trsp). I think it has been checked into a git branch at origin/trsp. It is not documented yet. If you have questions or need help ask on the pgrouting list, because that is where I hangout. -Steve


2

Are you sure your mapconfig.xml is ok? There is a good tutorial on: http://download.osgeo.org/pgrouting/foss4g2010/workshop/docs/html/chapters/osm2pgrouting.html


2

If these additions should only be visible to the user that added them, then you cannot add the data to OSM. You will have to store that data using your own infrastructure (database servers etc.). Note however that if your user adds a driveway based on the location of a (say) street that you displayed to her using OSM data, then the data entered by the user ...


2

You'll have to create an INSERT statement that constructs a line from your centroid to your road segment. Some useful postgis functions would be: st_make_line line_locate_point(ST_GeometryN(road.geom, 1), centroid.geom) st_distance(road.geom, centroid.geom)


2

geometry_columns and spatial_ref_sys are created and populated by PostGIS automatically in case you add a geometry column. The other tables are more or less temporary, used for finding links via assign_vertex_id. osm2po does all this segmenting-stuff for you. All you need is the resulting table which is created by osm2po. In addition osm2po does not rely on ...


2

Should be here: /usr/share/bin/osm2pgrouting See also: https://github.com/pgRouting/osm2pgrouting/blob/master/CMakeLists.txt But particularly if you are dealing with large data (e.g. europe.osm) you might want to try osm2po instead of osm2pgrouting.


2

As already mentioned you have to look at the highway key. The colors you are talking about are defined by the rendering stylesheet and represent the following tags: blue: highway=motorway, highway=motorway_link green: highway=trunk, highway=trunk_link red: highway=primary, highway=primary_link orange: highway=secondary, highway=secondary_link yellow: ...


2

It's true, what is in special interest in this case are all objects with highway=* tagged. BUT usually all the processing is already done by OSM2pgrouting and you don't need to struggle around with tagging schemas etc. If you then want to tweak the routing itself, you might consult the pgrouting manual. So you download an OSM planet extract, (optional ...


2

Adding next countries to existing table is not a good idea, because added data will not be joined with existing one topologically. Although PGRouting provides some functions for creating topology in my opinion there'll be simplest and quickest way to load a new data. Osmosis will do a good job with joining few countries extracts into one file osmosis --rx ...


1

Use the OpenStreetMap (OSM) Key for Highways: http://wiki.openstreetmap.org/wiki/Key:highway


1

(1) About compiling problems You wrote that you compiled PostgreSQL and PostGIS from source. Probably required libraries or header files are not found. It seems that you are using Ubuntu, so I don't really understand why you don't use the default PostgreSQL and PostGIS packages. For PostGIS 2.0 Launchpad PPA's exist as well. (2) About using the correct ...


1

another simple option could be switch to osm2po (www.osm2po.de) tool that works with PostGIS 2.0 and could cook sql-script for osm to pgRouting data transformation.


1

osm2pgrouting doesn't work with PostGIS 2.0 yet, because it creates MultiLinestring geometries while the ST_Startpoint function of PostGIS now only works with Linestring. What you can do for now is to either fix the osm2pgrouting source and recompile, or use the Ubuntu package and load the legacy.sql functions and later alter the geometry manually and run ...


1

You may want to try a new version of osm2pgrouting. It's available in the "develop" branch of the Github repository or in this PPA on Launchpad: https://launchpad.net/~georepublic/+archive/pgrouting-unstable Though this would require that you also use the new version of pgRouting.


1

The cost and reverse_cost attributes of the ways table give you this information. The direction itself depends on the geometry.


1

http://www.webrian.ch/2011/07/set-up-pgrouting-with-openstreetmap.html describes one possible solution. The challenge is that osm2pgrouting does not import one-way information. The author uses GRASS to find one-ways from the data. This solution sets reverse_cost to -1 to mark one-ways. In pgRoutingDocs there is "How to handle one-way streets" The idea ...


1

I am just learning postgres and I just spent 3 hours with the same exact error. In my case I was loading a national roads network shp file for Canada. I fixed it by reimporting the data with simple geometry using the shpfile importer. (there is a checkbox under options, or -S at the commandline). There should be something similar for the OSM importer. ...


1

Which OS are you on. local means none ip connection, socket connection. That said you may want to add the below since you are connection by ip. host all all 127.0.0.1/32 trust For ipv6 connection you would need: host all all ::1/128 trust (windows 7 for example usually tries to make an ipv6 connection when you put ...


1

I had the same problem, then I tried to add the optional parameter -host specifing the 127.0.0.1 address. Everything went well for me. It's just a suggestion but I think could work.. regards Lorenzo


1

Also, depending on your OS, you must increase the maximum amount of 'virtual memory' allowed, or create a large enough swap file (i.e. http://doc.ubuntu-fr.org/swap). Extracting france.osm used 30 gigs in my case...


1

If you work with big files (3GB+) - you need to switch to x64 Ubuntu environement. Problems solved. Works smooth!


1

Some of the road/way names in the OSM data seem to contain a backslash ("\") which they should not. This case is not tested and fixed by the "osm2pgrouting" tool so far and this most probably causes the error you get. What you could do is inserting the following line in the in the "exportWays" method in the "Export2DB.cpp" file (in the "src" folder of your ...



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