Example #1
0
        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'
        db.move_intersect()

    if address:
        print 'Assigning addresses to buildings.'
Example #2
0
        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'
        db.move_intersect()

    if address:
        print 'Assigning addresses to buildings.'