update pseudocode
This commit is contained in:
parent
5dc7ac9206
commit
c42f5423b8
@ -1,13 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# for TOID in geometries
|
||||
# for geometry in geometries
|
||||
|
||||
# if geometry.TOID not in builings
|
||||
# INSERT
|
||||
# add build date
|
||||
# Add TOID to temp table called new_geometries
|
||||
# psql -c "INSERT INTO buildings ( geometry_id, ref_toid ) SELECT geometry_id, source_id from geometries;"
|
||||
|
||||
# for TOID in buildings
|
||||
# for each building.coordinates <10m away from a building.coordinates
|
||||
# Mark one with older build date (or blank) as demolish date = build date of the new one
|
||||
# for building in buildings
|
||||
|
||||
# if building.TOID not in new <mastermap download>
|
||||
# (need a <mastermap download> table with all TOIDs in the new release, but not the old ones too, which geometires has)
|
||||
# buildings.dynamics_has_demolished_buildings = TRUE
|
||||
|
||||
# secondarily, if building.coordinates <10m away from any new_geometry.coordinates
|
||||
# older_building.dynamics_has_demolished_buildings = TRUE
|
||||
# link new_geometry TOID in the geometries table to old building and delete duplicate building we just created for new_geometry
|
||||
|
||||
|
||||
psql -c "INSERT INTO buildings ( geometry_id, ref_toid ) SELECT geometry_id, source_id from geometries;"
|
||||
# Worry about build dates for switching next
|
Loading…
Reference in New Issue
Block a user