Hot answers tagged

17 votes
Accepted

How to make osm2po 5.1 write an SQL file?

Spotted this under the release notes The PgRoutingWriter has moved to the osm2po-plugins.jar which is open source. The writer is not enabled by default anymore. If needed, please edit (...
user avatar
  • 19.8k
7 votes

How to easily remove loose/isolated edges from pgRouting network?

In PgRouting 2.0 there is a pgr_analyzeGraph function that will identify isolated segments. Isolated segments will have a dead-end at each end so a query like this against your network and vertices ...
user avatar
  • 1,832
7 votes

Why is any pgr_* routing function taking forever based on OSM data in an pgrouting enabled DB

Use this guide to set up indexes for a spatial database. Here is the gist of it: 1. create indexes on ID, source and target columns. 2. create index using GIST on geom column. 3. vacuum 4. ...
user avatar
  • 3,520
6 votes
Accepted

How to generate pgrouting source and target with OSM?

In case you haven't tried it yet, the pgRouting Workshop is always a good place to get started. When you used osm2po to convert your OSM data, then source and target attributes are already there and ...
user avatar
  • 4,752
5 votes
Accepted

How to create more networking osm

I had the same problem few weeks ago and solved it by manually drawing lines from nearest node. I don't know if it's one and only resolution, it's quite hard and tricky but its working quite good. ...
user avatar
  • 2,587
5 votes
Accepted

How to export a postgis table to a pbf file?

GDAL can only read pbf files, so no chance to write it with GDAL or QGIS. Osmosis is able to read from a postgis database and write to pbf, but only for its own snapshot or simple data scheme. These ...
user avatar
  • 75.2k
5 votes

How can I know why an OSM way cannot be used for routing, and how can I fix it

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 ...
user avatar
4 votes
Accepted

osm2po to import whole planet

Which osm2po version did you use and how (parameters?) did you start it? Hmmm... 74,660,756 of 235,414,299 sounds great. The rest are buildings, places, areas, boundary segments etc. and no routable ...
user avatar
  • 3,248
4 votes
Accepted

How can I know why an OSM way cannot be used for routing, and how can I fix it

Indeed, the default.config is very strict and to be honest it's too strict for my taste. I stumbled across a similar question weeks ago and modified the osm2po release notes for 5.1.0 to report this ...
user avatar
  • 3,248
4 votes

pgr_createTopology - how tolerance?

I guess that you took the example createTopology function which is shown for WGS84 geometries, using degrees as a projection unit. 0.00001 degree tolerance means that your points have to be less than ...
user avatar
3 votes

What does the values in column clazz (osm2po) mean?

As for the flags, I just wrote up a little explanation here. I wish I would have figured the flags out a while ago! Very useful, and a clever encoding.
user avatar
3 votes
Accepted

What does the values in column clazz (osm2po) mean?

The file osm2po.config, which can be obtained from the downloads tab on the osm2po page, contains a table with four column, defined as: 1) concurrent order 2) class (1-127) 3) default ...
user avatar
  • 13.3k
3 votes

How do I create a new vertex in the middle of an edge in postGIS?

This looks like what you are trying to do -- take a look at it. The example below uses the old name http://trac.osgeo.org/postgis/wiki/UsersWikiSplitPolygonWithPoints Anyrate the key is using ...
user avatar
  • 10.1k
3 votes
Accepted

How do osm2pgrouting and osm2po differ in their ways creation?

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, ...
user avatar
  • 248
3 votes

How to easily remove loose/isolated edges from pgRouting network?

If instead single isolated segments, you need to identify sub-graphs that are isolated from the rest of the graph, then using pg_routing pgr_connectedComponents() function will separate all nodes into ...
user avatar
3 votes
Accepted

Improving speed on pgRouting on table update with many rows: faster to loop on each row than a table update call?

Yes, there are memory limits and processing in chunks is faster. It's hard to say how big chunks you should use. Apart from processing in smaller parts you should also consider following: Make sure ...
user avatar
  • 2,764
3 votes

SAXParseException in OSM2PO

Ok, there are three possible reasons: the file does not have a .pbf extension the plugins.jar could not be found the file itself is corrupt
user avatar
  • 3,248
3 votes

Meaning of OSM file columns

These columns are created by osm2po based on your osm2po.config file. These specific columns and values are not contained in OSM! They are constructed based on certain rules that osm2po assumes and ...
user avatar
  • 5,704
2 votes

Why won't osm2po setup table correctly?

You have may have to call create extension postgis again if this is not caused by uppercase prefix for you, because 'AddGeometryColumn' requires postgis and if it fails to run, the error will look the ...
user avatar
2 votes

How to easily remove loose/isolated edges from pgRouting network?

Hmmm... no answers here ... Ok... look for this line inside the config and comment it out: postp.1.class = de.cm.osm2po.plugins.PgVertexWriter This will give you an additional table of vertices. ...
user avatar
  • 3,248
2 votes

osm2po is missing edges while importing to pgRouting

osm2po only takes roads into account, that are listed (and not commented out) in the configuration file. Did you take a look?
user avatar
  • 4,752
2 votes

Split OSM highways at vertice

You are going to split at each point? This may produce tons of data! Yes, osm2po can do that. Usually osm2po splits at intersections or at important nodes such as levelcrossings if necessary. The ...
user avatar
  • 3,248
2 votes

How to easily remove loose/isolated edges from pgRouting network?

Since you mentioned using QGIS, I had a similar problem, so I developed a QGIS plugin which is now available in the official QGIS plugins repository and can be found in the QGIS menu: Plugins / Manage ...
user avatar
  • 601
2 votes

What does the values in column clazz (osm2po) mean?

From the osm2po.config file: road type clazz motorway 11 motorway_link 12 trunk 13 trunk_link 14 primary 15 primary_link 16 secondary 21 secondary_link ...
user avatar
2 votes
Accepted

osm2po network access

The parameter you are looking for is service.domain. Either change it in the osm2po.config-File or pass it on the command line java ... osm2po.jar ... service.domain=192.168.1.5
user avatar
  • 3,248
2 votes
Accepted

Get road type (clazz) is osm2po 5.0.0

Responsible for the value U receive is the DefaultGraphBuildInterceptor. The current implementation does the following: @Override public int getFlags(SegmentedWay way, int segmentIdx, boolean reverse)...
user avatar
  • 3,248
2 votes

Why low speed function call pgr_dijkstra in database PostgreSQL after importing map from file osm.pbf using osm2po?

pgRouting queries are as faster as smaller your selected road network is. And it's as slower s larger your selected road network is. Your selection is the first argument of the pgr_dijkstra function: ...
user avatar
  • 4,752
2 votes

Why low speed function call pgr_dijkstra in database PostgreSQL after importing map from file osm.pbf using osm2po?

SELECT seq, id1 AS node, id2 AS edge, g.geom FROM pgr_dijkstra( 'SELECT id, source, target, cost FROM pgr as r, (SELECT ST_Expand(ST_Extent(geom),0.1) as box FROM pgr as l1 ...
user avatar
  • 41
2 votes

I need detailed direction to use osm2po or osm2pgrouting

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 ...
user avatar
  • 12.5k
2 votes
Accepted

Parameters start_id and end_id when calling http://localhost:8888/Osm2poService?cmd=ft&tsp=

A TSP usually expects source=target. The parameters are fully explained on the osm2po-WebPage (under help->server). Nevertheless, what you need is a CSV of VertexIds you are going to visit. The first ...
user avatar
  • 3,248

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