add update_building_records script pseudocode

This commit is contained in:
Ed Chalstrey 2022-04-08 09:49:39 +01:00
parent ee59455dca
commit 5dc7ac9206

View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# for TOID in geometries
# if geometry.TOID not in builings
# INSERT
# add build date
# 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
psql -c "INSERT INTO buildings ( geometry_id, ref_toid ) SELECT geometry_id, source_id from geometries;"