Closed cvvergara closed 7 years ago
@markjd84 Can you give me the exact query you were using that was not working?
No query just running from command:
/path/to/osm2pgrouting/build/osm2pgrouting \
-c /path/to/osm2pgrouting/mapconfig_for_cars.xml \
-f brussels.osm \
--dbname o2ptest \
--username XXX \
--password YYY \
--prefix osm2pgr \
--clean
I had wondered if it was something to do with an unwanted Django migration (as that's what I'm using), but running the above on a fresh db, with full privs, PostGIS and pgR, produces same error as above.
osm2pgrouting-2.1.0-115-g2734c01
@markjd84 can you run:
SELECT DISTINCT maxspeed_forward, maxspeed_backward FROM ways;
and post the results please
Ok here's what the behaviour appears to be:
ways
was getting populated if you loaded without --prefix
; osm2pgrways
was not getting populated if you loaded with --prefix
osm2pgrosm_relations
was showing up SELECT DISTINCT maxspeed_forward, maxspeed_backward FROM osm2pgrways;
maxspeed_forward | maxspeed_backward
------------------+-------------------
(0 rows)
This is ok for me for now as I don't particularly need the prefix, I can code around it not being there by just using the ways
table in my app, but worth you knowing it's still not quite right (at least for me)
Cheers (and sorry for the delay)
Thanks, I need to work on this more, there still a bug.
@markjd84 I think the prefix & suffix should work now, (at least it works in my computer but if its not much trouble can you try again? And give me your opinion
Yep that seems to work for me now too. Thanks!
Well, kind of. It works on a fresh database, but can't seem to handle a Django-managed one. No idea why as all privs granted etc. I suspect this is Django's problem as opposed to an issue with osm2pgr, but thought I'd document. Also not a major problem as I can work around with a second database.
Creating tables...
Exists: 'osm2pgrways_vertices_pgr': OK
Exists: 'osm2pgrways': OK
Exists: 'osm2pgrrelations_ways': OK
Exists: 'osm_nodes': OK
Exists: 'osm_relations': OK
Exists: 'osm_way_types': OK
Exists: 'osm_way_classes': OK
Adding auxiliary tables to database...
Export Types ...
Processing 1 way types: Inserted: 0 in osm_way_types
Export Classes ...
Processing way's classes: Inserted: 0 in osm_way_classes
Export Relations ...
Processing 0 relations: Inserted: 0 in osm_relations
Export RelationsWays ...
Processing way's relations: Inserted: 0 in osm2pgrrelations_ways
Export Ways ...
Processing 245874 ways:
[*************************************************| ] (99%) Ways Processed: 245874 Split Ways generated: 38079 Vertices inserted Inserted split ways
Creating Foreign Keys ...
Foreign keys for osm_way_classes table created
7foreign keys for osm_way_tags failed: ERROR: relation "osm_way_tags" does not exist
Foreign keys for osm2pgrrelations_ways table created
Foreign keys for Ways table created
#########################
size of streets: 245874
Execution started at: Thu Nov 3 14:25:36 2016
Execution ended at: Thu Nov 3 14:26:21 2016
Elapsed time: 45.288 Seconds.
User CPU time: -> 42.4164 seconds
#########################
Note the error message and the 'Inserted <??> split ways'.
I tried this with and without --clean
but to no avail.
fixed the error ERROR: relation "osm_way_tags" does not exist on this (#154) pull request
Bug in develop
Master, well relations didnt even work at all, so no bother. (related to #150)
theoretically I fixed it in develop but this should not happen: