pgRouting / osm2pgrouting

Import tool for OpenStreetMap data to pgRouting database
https://pgrouting.org
GNU General Public License v2.0
289 stars 111 forks source link

Importing osm2pgrouting "Unknown maxspeed3 value: signals" AND "Inserted: 0 way's relations" #162

Open Stophface opened 7 years ago

Stophface commented 7 years ago

I try to import OSM data from New York and I get in the command line:

Unknown maxspeed3 value: signals (70 streets in total)

Further, there is

Processing way's relations: Inserted: 0 way's relations.

Should that be? The rest, 4 way types, 36 way classes, way tags and ways look fine. What are way's relations anyway?

Reproduce the data and error: Working with OSGeo Live 7.9 in a Virtual Box on OS X 10.10.5

CITY="NEW_YORK"
BBOX="-74.3500,40.4929,-73.5892,40.9343"
wget --progress=dot:mega -O "$CITY.osm" "http://www.overpass-api.de/api/xapi?*[bbox=${BBOX}][@meta]"

Set up the database:

psql -U user
CREATE DATABASE nyc;
\c nyc
CREATE EXTENSION postgis;
CREATE EXTENSION pgrouting;

Then I run:

osm2pgrouting -f NEW_YORK.osm -d nyc -U user
cvvergara commented 7 years ago

@Stophface osm has many ways to indicate maxspeed

osm2pgrouting currently covers the numeric types, and converts the value to km/hr. when it encounters a non numeric type, it complains but uses the default value found on the configuration file. if no default value is in the configuration file it uses 50km/hr.

I haven't tried it, but maybe adding a:

<type name="maxspeed" id="8">
<class name="signals" id="800" maxspeed="5<your prefered value">
</type>

to the configuration file will catch those,

Any way can you tell me which version of osm2pgrouting are you using? Latest is: This is osm2pgrouting Version 2.2

Stophface commented 7 years ago

@cvvergara its version 2.1 in the OSGeo Live. Thanks for your explanation. I'll try your suggestion!

I added another strange(?) thing to my question:

Processing way's relations: Inserted: 0 way's relations.

When I check the table public.relation_ways, it is empty, apart from the columnnames. Should that be? The rest, 4 way types, 36 way classes, way tags and ways look fine. What are way's relations anyway?

cvvergara commented 7 years ago

https://wiki.openstreetmap.org/wiki/Relation

I wonder if using the osgeo live you can update to the latest version.

cvvergara commented 7 years ago

but if ways is ok, you can stick with it.

Stophface commented 7 years ago

@cvvergara thanks! You are really helping me out. I am following a tutorial that is using OSGeo Live. http://workshop.pgrouting.org/2.1.0-dev/en/chapters/prepare_data.html Having a look at what they copy & paste they have relations. But then, I do not know if they did the steps in the OSGeo Live. Probably not. I am sure there is a way to update... Is there a line for the shell that I could I use? I would try ::)

cvvergara commented 7 years ago

I dont know, I'l ask around. this is the manuals: https://github.com/pgRouting/osm2pgrouting/wiki