Hot answers tagged

8

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


8

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


7

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


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


4

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


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

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)


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


3

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


3

They are called diff updates. You have two options .. Apply the Diffs from PlanetOSM and then remove the imported geometry that are outside of your bounding box Use the Geofabrik Extracts for North America and apply the Geofabrik diffs which are updated daily. I do both, 3 minute diff updates for the planet and daily diff updates for the Philippines, in ...


3

The "Topology" chapter of the workshop is there to explain the basics about the routing network. The first paragraph should actually explain that. If it's not so clear, then I will change this with the next version of the workshop. But if you import OSM data you just use an import tool named "osm2pgrouting", which is explained in detail a few chapters later:...


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

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

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

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

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

First you want to post your question in a readable form, so I don't have to spend time making it readable (already done, so remember for your next question, please). Second, read the documentation how to compile pgRouting and what is required: http://docs.pgrouting.org/2.0/en/doc/src/installation/build.html#build Third, read the error message, which ...


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


2

After analyzing my dataset more with QGIS I think I've found most of the differences. Using osm2pgrouting with mapconfig_for_cars.xml still includes vertices related to pedestrian interaction, whereas osm2po with wtr.finalMask = car does not. Here is a view of OSM of an intersection with crosswalks... Here is a view of my dataset (which is roads only)...


2

If you have a package manager for your OS, install one of: libpq-dev for Debian, Ubuntu and friends, or libpq-devel for RHEL, CentOS and friends. See also "Building libpq Programs".


2

There are a couple of sources which describe how to develop isochrone maps: Public transport isochrones with pgRouting This post contains information in great detail on how to install, run and conduct a variety of analyses on isochrone maps with pgRouting. Included a couple of images so you can if it's something you are looking for: Image of pgRouting ...


2

There are a couple of things coming to my mind here: First, and foremost, why you feel the need to use an unproven HPC routing solution to do something for which the OSM community already developed proven and tested solutions? Routing on OSM data has been implemented as several Open Source projects (See http://wiki.openstreetmap.org/wiki/Routing. Even ESRI ...


2

I realized I had omitted another good link for you. There is an interesting blog by one of the ESRI developers involved in the HPC stuff (Mansour Raad). I hadn't visited it for a while, but it turns out he actually wrote an article about invoking a Spark job from within ArcGIS for Desktop using ArcGIS Geoprocessing tools. There is code samples as well. I don'...


2

Only way I've been able to do it (I think it works for osm2pgrouting, but haven't tried recently) Is to first change the search_path of your database temporarily so preferred schema is first: ALTER DATABASE yourdb SET search_path = osm_data, public; Then run osm2pgrouting Alternatively you could create a user specifically for loading and then set the ...


2

Are you using the master or develop branch of osm2pgrouting, I notice the help is a little different between the two. I'm using the develop branch and it has these instructions: -c [ --conf ] arg (=/usr/share/osm2pgrouting/mapconfig.xml) Full instructions: Allowed options: Help: --help Produce help message for this version. General: ...


2

As suggested in the comments, expecting a complete tutorial for someone with little computer admin experience is unrealistic, and unlikely to really help you. Sorry if that isn't what you wanted to hear. I'd suggest two options, depending on your cash / time trade-off, and what you are actually trying to achieve: Pay someone to do this for you. In the end,...


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



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