Example #1
0
        print 'Getting rid of overlapping address points...'
        db.dedupe_address()

    if roads_download:
        print 'Querying OverpassAPI for highway=* and railway=*.'
        roads = osm.query_roads()
        print 'Uploading OSM highway=* and railway=* to Postgres...'
        db.insert_osm(roads, 'osm_highway_railway')

    if vacuum:
        print 'Updating DB stats.'
        db.update_stats()

    if index:
        print 'Creating multiple indexes.'
        db.create_index()

    if simplify:
        print 'Simplifying import building geometries'
        db.simplify_buildings()

    if add_fields:
        print 'Adding logical fields to import data'
        db.add_fields_input_data()

    if check_address:
        print 'Checking and flagging import addresses near OSM addresses...'
        db.check_exitsing_addresses()

    if check_building:
        print 'Checking and flagging import buildings near existing buildings...'
Example #2
0
        print 'Uploading OSM addresses to Postgres...'
        db.upload_osm(addresses, 'osm_addresses')

    if roads_download:
        print 'Querying OverpassAPI for highway=* and railway=*.'
        roads = osm.query_roads()
        print 'Uploading OSM highway=* and railway=* to Postgres...'
        db.upload_osm(roads, 'osm_highway_railway')

    if vacuum:
        print 'Updating DB stats.'
        db.update_stats()

    if index:
        print 'Creating multiple indexes.'
        db.create_index()

    if delete_err:
        print 'Removing faulty buildings.'
        db.delete_err_buildings()

    if intersect:
        print 'Intersecting OSM buildings with Large buildings. Populating tables for overlapping and non-overlapping buildings.'
        db.do_intersection()

    if move_self_intersect:
        print 'Checking self intersecting buildings and moving them to manual bucket.'
        db.move_self_intersect()

    if move_intersect:
        print 'Moving buildings that share common border to manual bucket'