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 (...
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. ...
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 ...
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 ...
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 ...
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
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.
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 ...
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 ...
3
votes
Accepted
How to add our own routing data from postgresql into osm2po graph
I'm sorry it's not. osm2po is a chain of many conversion steps. The generated postgres table is only one of many.
However, technically osm2po is prepared for custom sources. But this has to be ...
3
votes
Accepted
Getting meters from pgr_dijkstra
The unit is degree, as you seem to have geometries referenced in EPSG:4326, and the edge length as cost.
If so, two options
if your cost attribute is the plain length of each edge (shortest path), ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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:
...
2
votes
My osm2po java program compiles but gives a runtime error
Yoy need to specify the classpath. The error is saying that a class is not being found. Execute your file with the cp option:
java -cp osm2po-core-5.0.0-signed.jar TestOSM
2
votes
Accepted
osm2po > PostGIS > QGIS/pgRoutingLayer Extension Issue
Unfortunately pgRoutingLayer wasn't upgraded to use the new pgRouting 2.1 functions that support bigint so it's still falling back on 2.0 which doesn't support bigint.
Looking at the os2po data I ...
2
votes
QGIS Pgrouting layer plugin error
Have a look at your database either in PGAdmin or through the QGIS Browser panel and check to see what your tables are named vs. what the example states.
My 'edge_table' is called 'ways'
my 'id' is ...
2
votes
osm2po highways and surfaces
Seems, you are only interested in pedestrian routing...
but pay attention to the surface tags because they may also be attached to other types. I assume, your example above catches almost everything, ...
2
votes
Accepted
Unable to use pgRouting Layer QGIS plugin with osm2po tool (database connection error)
Well, thanks to the previous relevant posts at GIS-SE: pgRouting Layer Plugin Db error and unable to implement pgRouting Layer plugin I figured out my mistake by myself. When I connected to my ...
2
votes
Accepted
pgr_createTopology - how tolerance?
Follow this guide to find your tolerance and to create the nessesary columns before running pgr_createTopology:
https://workshop.pgrouting.org/2.2.10/en/chapters/topology.html
SELECT find_srid('...
2
votes
Accepted
How to keep an OSM routing topology updated?
even small changes force a complete rebuild of the osm2po topology. The reason are the OSM-IDs which change with each new delta.
2
votes
Using osm2po to route using places (saved as multipolygon)
osm2po is able to reconstruct areas of ways on the first recursion level. Meaning, osm2po cannot rebuild them from relations which themselves contain relations.
However, your assumption is correct. ...
2
votes
Accepted
maxSpeed tags versus default speeds
I agree, this would be a good idea and more realistic.
However, I do not want to pump up osm2po with too many extra stuff.
These specials must be implemented on code level. The framework can be easily ...
2
votes
Accepted
Does osm2po support anchor tags with a colon?
The config is a Properties-File and Java does some annoying extra stuff here.
Setting the parameter on the commandline works well.
But declaring it in the config file needs a '\' to escape the Java-...
2
votes
Add a POI in pgrouting
You could use the ST_Closespoint function in PostGIS on your POIs before generating the network.
Here is a similar question: How to connect points (bus stops), which don't lie on the lines (...
2
votes
Add a POI in pgrouting
You could use one of the withPoints function to start routing from a POI.
The withPoints functions are not officially released yet, but they will be in the next release probably.
See this summary ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
osm2po × 192pgrouting × 65
openstreetmap × 53
postgis × 37
routing × 33
postgresql × 20
qgis × 8
java × 8
osm2pgrouting × 8
postgis-2.0 × 5
dijkstra × 4
osm2pgsql × 3
python × 2
gps × 2
graph × 2
optimization × 2
memory × 2
transportation × 2
astar × 2
geofabrik × 2
arcpy × 1
geoserver × 1
geojson × 1
sql × 1
distance × 1