pgRouting / osm2pgrouting

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

after importing without --clean option duplicate foreign keys created #159

Closed slbug closed 7 years ago

slbug commented 7 years ago
Foreign-key constraints:
    "osm_way_classes_type_id_fkey" FOREIGN KEY (type_id) REFERENCES osm_way_types(type_id)
    "osm_way_classes_type_id_fkey1" FOREIGN KEY (type_id) REFERENCES osm_way_types(type_id)
    "osm_way_classes_type_id_fkey2" FOREIGN KEY (type_id) REFERENCES osm_way_types(type_id)
    "osm_way_classes_type_id_fkey3" FOREIGN KEY (type_id) REFERENCES osm_way_types(type_id)
    "osm_way_classes_type_id_fkey4" FOREIGN KEY (type_id) REFERENCES osm_way_types(type_id)
    "osm_way_classes_type_id_fkey5" FOREIGN KEY (type_id) REFERENCES osm_way_types(type_id)
    "osm_way_classes_type_id_fkey6" FOREIGN KEY (type_id) REFERENCES osm_way_types(type_id)
    "osm_way_classes_type_id_fkey7" FOREIGN KEY (type_id) REFERENCES osm_way_types(type_id)

May be foreign keys should be created only on clean import or check if constraint exists before creating it

cvvergara commented 7 years ago

Will do it only on the clean import. for the 2.2.1

slbug commented 7 years ago

also i have a question, is there a possibility to import new diff file? (e.g. delete some nodes, create new ones, etc). just to have routing DB synced to current OSM DB. and sync should not not take a lot of time.

cvvergara commented 7 years ago

never tried it, but, it will use the incremental update, new things get added but not deleted.