Skip to content

Instantly share code, notes, and snippets.

@adriantre
Created December 2, 2016 14:06
Show Gist options
  • Save adriantre/c06a039831cb0f71ca47ffb783d6e24e to your computer and use it in GitHub Desktop.
Save adriantre/c06a039831cb0f71ca47ffb783d6e24e to your computer and use it in GitHub Desktop.
Klipp rundt trondheim
delete from table where id not in
(
select id from table where ST_Contains(
ST_MakePolygon(
ST_GeomFromText('LINESTRING(10.4588 63.4419, 10.4588 63.4018, 10.3496 63.4018, 10.3496 63.4419, 10.4588 63.4419)',4326)
),
geometryfield
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment