[postgis-users] creating a mask

Obe, Regina robe.dnd at cityofboston.gov
Thu Aug 7 06:28:38 PDT 2008

I think the ST_Difference function may work for you.
Basically get the extent of your world make a polygon out of it and then
subtract the world
So something like the below
SELECT ST_Difference(ST_SetSRID(ST_Extent(the_world),
ST_SRID(the_world), the_world)
Hope that helps,


From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of erik
Sent: Thursday, August 07, 2008 9:11 AM
To: PostGIS Users Discussion
Subject: [postgis-users] creating a mask


I don't know if the terminology I use is correct but I would like to
create a mask of layer I have.
For example, from the shape of the world I would like to keep only the
oceans, the negative of the initial shape.
I haven't found any info or documentation about this. Can this be done
in PostGIS?

Many thanks!


The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080807/d28a18dc/attachment.html>

More information about the postgis-users mailing list