Tag Info

Hot answers tagged

7

You can find such a function here: https://github.com/pgRouting/pgrouting-contrib/blob/master/wrapper/routing_core_smart.sql#L69 It searches for the nearest link in the network, which usually gives a better result. If you use Shooting Star you can then start routing from/to this link. For A* or Dijkstra you either select start or end point of the link, or ...


6

The only practical way is to add the 'missing' routes the data yourself. OSM probably shouldn't be putting parking lots into its walking routes. There are liability issues with adding routes that aren't real, properly maintained pedestrian paths. A parking lot, though walkable, could be dangerous and could be private property. You'll have similar issues with ...


6

Yes, it's possible. But osm2po only takes barrier=bollard into account by default. If you need other types of barriers you'll have to use Java in order to override DefaultNodeTagResolver.isBarrier(). For pgRouting this information can be retrieved from the Vertex-Table which is not written by default, but can be activated by setting ...


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

Just an assumption: osm2po builds blocks of 25 data rows per insert for performance reasons and to avoid memory issues. Do you import it in one single Transaction (parameter -1 or --single-transaction)?


4

public static double calcDistanceSphere( double lat1, double lon1, double lat2, double lon2) { // see: http://www.movable-type.co.uk/scripts/latlong.html double d = StrictMath.acos(StrictMath.sin(lat1 * RAD_PI) * StrictMath.sin(lat2 * RAD_PI) + StrictMath.cos(lat1 * RAD_PI)* StrictMath.cos(lat2 * RAD_PI) * ...


4

Bearing in mind Sean's answer (that you have to add 'missing' pats yourself) as well as that these missing parts technically are parts of road-graph which are in turn are just lines, here is the quick'n'dirty workaround you may use. If the walking path has a common point with a "walkable" polygon, export this polygon's border as a line into your road-graph ...


4

This should do the trick: Open the osm2po.config in a text editor. Uncomment (remove the '#' sign) for wtr.tag.highway.service = 1, 51, 5 and wtr.tag.highway.track = 1, 71, 10 Scroll down and check out the Allow/Deny-tags For example, "wtr.allow.highway.track = foot|bike", this means only foot and bike are allowed on this highway. This ...


4

It's the nature of osm that everyone can modify things. Hence you cannot rely on IDs.


4

Firstly, decide which roads are candidates for walking: Add "foot" to the list of allowed types wtr.tag.highway.residential=1,32,50,car|bike|foot wtr.tag.highway.pedestrian=1,62,5,bike|foot Set the finalMask in order to take them into account wtr.finalMask=car|bike|foot If you are only interested in walkable roads, set wtr.finalMask=foot Set ...


4

What you need is a directed graph. The table osm2po creates for pgRouting is not directed. Nevertheless you can derive one forward and one backward edge from each segment (table-row). The result is an adjacency list - a little different from your representation: graph = { 'A': {'B': 10, 'D': 4, 'F': 10}, } osm2po (and I think pgRouting does also) uses ...


3

Yes, this is possible by modifying the cmd= parameter. By default the value is tjsgpr (Tiler|Joiner|Segmenter|Postprocessors|Graph-builder|Routing). cmd=c is short form of cmd=tjsp. In the German documentation there is a table around page 15 explaining each command. Only for t (Tiler) for example you need to pass the data source URL or path, j depends on t, ...


3

The attribute you are looking for is the clazz column. Tipp: Compare the values to those configured in the osm2po.config file.


3

I've just modified osm2po-tsp. Now it should handle different sources and targets and intermediate vertices.


3

Are you using SOAP or HTTP/GET via JavaScript/AJAX? In both cases you get all segments where each segment contains the distance and time values. All you have to do is to add those values.


3

Indeed, you can improve the performance a lot. What you are doing here in order to fetch a distance between two points is to call the entire routing batch for each pair. Usually a routing needs three steps: Finding the nearest Source- and TargetVertex on the network. Calculating the shortest path between them Reconstructing all path informations ...


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

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


2

Another way is to enable the this line (by removing the leading #) in the config. postp.2.class = de.cm.osm2po.plugins.PgVertexWriter It's another osm2po-table which contains the vertices.


2

I guess you mean something like this: Create a symbol with one line layer and two marker layers. Put the markers on the first and on the last vertex:


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

osm2po does export EPSG 4326 only. As geom_way is a pure PosgGIS data type, you can indeed change it using ST_Transform. x1, y1, x2, y2 are hard coded values for pgRouting's aStar. I do not know what will happen if you transform them also.


2

I do not think that you can rely on the nearest vertex. Imagine source and target are located on the same edge close to the same vertex. You'd rather considered three! different cases: a vertex is the nearest point. a form node of the edge is the right one the edge-line itself is nearer. (orthogonal)


2

Have a look into the osm2po.config file. There you'll find lines like this one: wtr.tag.highway.motorway = 1, 11, 120 (concurrent order, clazz, default speed) e.g. filter your clazz-column (clazz=11) and you'll retrieve all motorways. concurrent order means, that if osm gives you two main tags for the same street (e.g. highway=residential and ...


2

the reason is simple: Some fool has tagged this street as "tertiary_link", which is nonsense. Regards, Carsten. PS: I've just corrected it in JOSM. With reference to your question in the comment... I don't know how Geofabrik interprets unknown tags. Anyway, osrm is based on an algo developed in Karlsruhe, Germany. Guess where Geofabrik have their main ...


2

you actually caught me on the wrong foot ;-) junction=roundabout needs some (hard coded) extra handling with reference to the oneways. Because of this fact, I've mistakenly isolated it in an else-block where the configuration could not override it. This will be fixed in the next version. THX!!! Nevertheless, junction=roundabout is not a main-tag. It's an ...


2

osm2po takes most of osm's turn restrictions into account. Nevertheless, I assume you are looking for some support for pgRouting's ShootingStar. But this has not been implemented by anyone, yet.


2

The new osm_meta-column has been introduced to satisfy future request. In some of my test cases I populated it with Routes (Relations) e.g. of Bus-Lines or MTB-Tours.


2

analyze the reverse_cost column. If it doesn't equal the cost column and has a hight cost, then it is a one way.


2

It's easy. Let's regard these lines: wtr.tag.highway.secondary_link = 1, 22, 30, car wtr.tag.highway.tertiary = 1, 31, 40, car|bike Setting wtr.finalMask = car imports both road types, setting wtr.finalMask = bike imports the tertiary road only. Actually car|bike are values (1+2=3) in the flags-column. It's derived from the wtr.flagList = car, ...



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