Skip to main content
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. ...
kttii's user avatar
  • 3,630
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 ...
Vincent Monteil's user avatar
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 ...
Alexandre Neto's user avatar
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 ...
scai's user avatar
  • 6,215
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 ...
Carsten's user avatar
  • 3,318
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), ...
geozelot's user avatar
  • 30.4k
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 ...
khajlk's user avatar
  • 1,081
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, ...
Carsten's user avatar
  • 3,318
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 ...
HeikkiVesanto's user avatar
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('...
Punnerud's user avatar
  • 136
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. ...
Carsten's user avatar
  • 3,318
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.
Carsten's user avatar
  • 3,318
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-...
Carsten's user avatar
  • 3,318
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 ...
Carsten's user avatar
  • 3,318
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 ...
dkastl's user avatar
  • 4,796
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 (...
ylka's user avatar
  • 1,077
2 votes

Meaning of OSM file columns

The tags km\h, flags, clazz are very unique. Taginfo doesnot show any record of them, so most probably they were used by people who had no idea about correct tagging techniques. It would be impossible ...
neogeomat's user avatar
  • 8,380
1 vote

Meaning of OSM file columns

OSM doesnot have data classified into layers, all the data is in one layer. The feature identify themselves as tags(in form of key = value pairs) e.g. amenity = bank , highway = motorway. When OSM ...
neogeomat's user avatar
  • 8,380
1 vote
Accepted

Using osm2po to avoid certain areas?

There is no "user friendly" way for doing such things. However, Java skills open the door and it is not difficult. First you need the polygons of your restricted areas. Ok, I assume they are in place ...
Carsten's user avatar
  • 3,318
1 vote
Accepted

OSM2PO V5.1 - Routing from mid line not working with Ovl routers

Try this here: http://localhost:8888/Osm2poService?format=geojson&routerId=4&cmd=fr&source=48.92456,20.85100&target=48.92439,20.69805&findShortestPath=false&ignoreRestrictions=...
Carsten's user avatar
  • 3,318
1 vote

Longer street segments in osm2po

In order to "repair" unnecessarily split ways the entire graph must be known. But this is the last step in the conversion chain. In the early steps this information is not present. But even if it was, ...
Carsten's user avatar
  • 3,318
1 vote
Accepted

Customize osm2po sql script

Yes, it'll be faster but not readable anymore - hard to debug if errors occur. So I once decided to use the text approach. Anyway, you can review the sources in the plugin's sources which are open and ...
Carsten's user avatar
  • 3,318
1 vote

database --> osm2po --> gph

no, currently it is not possible. But if I understood you correctly you are going to clip a region from a country extract. If you are not going to modify the country_2po_4pgr there is a parameter for ...
Carsten's user avatar
  • 3,318
1 vote

Correct routing on osm2po table

Everything is OK - routing includes all edges of graph - you have to manually cut first and last line... I've answered similar question here. I think this could be what you're looking for. EDIT: It ...
Jendrusk's user avatar
  • 2,617
1 vote

Correct routing on osm2po table

The created table only contains real intersections. If I understand the picture correctly, you want to locate source and target on arbitrary positions on edges - known as perpendecular foot. If so, ...
Carsten's user avatar
  • 3,318
1 vote
Accepted

Add height/elevation in generated sql files from osm2po

Therefore you'll have to overwrite some of the Default Classes. To get a first impression, look at this here: import de.cm.osm2po.converter.DefaultWayTagResolver; import de.cm.osm2po.primitives.Var; ...
Carsten's user avatar
  • 3,318
1 vote

How to get the nearest points from pgrouting linestring result?

Try analyzing your sub-statements to find out why it isn't working. I had a compound select statement such as yours which worked on one set of data but didn't on another due to the statement ...
kttii's user avatar
  • 3,630
1 vote

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

If you have one "global" network which is strongly connected and want to delete all islands, you could approach it the following way. The CTE returns the strongest component by grouping by ...
Timothy Dalton's user avatar
1 vote

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

I've ran into a similar problem with a large network (~400k edges). Peter's plugin works, but took many hours and all my RAM, probably because it partitions edges using their geometries when all I ...
DaGal's user avatar
  • 11
1 vote
Accepted

Does Osm2Po support administrative boundary extraction?

Boundaries are a beast and definetily OSM's most vulnerable spot. A small change and nothing works anymore. But to answer your question: Yes and No. osm2po supports Boundaries and since 5.1.20 even a ...
Carsten's user avatar
  • 3,318

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