diff --git a/etl/drop_outside_limit.sh b/etl/drop_outside_limit.sh index 133d481c..002fa89a 100755 --- a/etl/drop_outside_limit.sh +++ b/etl/drop_outside_limit.sh @@ -8,11 +8,11 @@ : ${1?"Usage: $0 ./path/to/boundary"} boundary_file=$1 -# Load boundary +echo "Load boundary..." psql -c "DROP TABLE IF EXISTS boundary" shp2pgsql -s 3857 $boundary_file boundary | psql -# Delete geometries (hence buildings, building_properties) +echo "Delete geometries (hence buildings, building_properties)..." psql -c "DELETE FROM geometries as g USING boundary as b WHERE b.gid = 1 AND NOT ST_ContainsProperly(b.geom, g.geometry_geom);"