How it works...

We added a buffered subset of a PostGIS layer in OpenJUMP using the Run Datastore Query menu. We took lines from a database table and converted them to polygons to view them in OpenJUMP.

We then manually selected an area of interest that had two representative stream polygons disjointed from one another, the idea being that the streams would be, or are, connected in a natural state.

The Fence tool was used to draw a freehand polygon between the streams. A union query was then performed to combine the two stream polygons and the fences. Fences allow us to create temporary tables for use in spatial queries executed against a database table.

Get PostGIS Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.