select statement for geometries not in builings
This commit is contained in:
parent
2c6051682b
commit
d930ae3a75
@ -18,13 +18,9 @@
|
||||
# geometry_id serial PRIMARY KEY,
|
||||
# source_id varchar(30)
|
||||
# );"
|
||||
psql -c "WITH new_geometries AS (
|
||||
INSERT INTO buildings ( geometry_id, ref_toid )
|
||||
SELECT geometry_id, source_id
|
||||
FROM geometries
|
||||
ON CONFLICT ( ref_toid )
|
||||
DO NOTHING RETURNING *
|
||||
);"
|
||||
psql -c "SELECT geometry_id, source_id
|
||||
FROM geometries
|
||||
WHERE source_id NOT IN ( SELECT ref_toid FROM buildings);"
|
||||
|
||||
# for building in buildings
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user