[OSGeo Africa] Oracle select query to select entities where the geometry only has one boundary

Mike Caister Mike.Caister at drdlr.gov.za
Tue Jun 12 23:23:24 PDT 2018


Thank you Gavin, I will give it a try.

Regards,

Mike Caister



From: Africa [mailto:africa-bounces at lists.osgeo.org] On Behalf Of Gavin Fleming
Sent: 13 June 2018 07:15
To: Africa local chapter discussions <africa at lists.osgeo.org>
Subject: Re: [OSGeo Africa] Oracle select query to select entities where the geometry only has one boundary

Hi Mike

Oracle not being FOSS and with it using the SDO geometry type that I’m not familiar with, I can’t give you the Oracle SQL answer, but the query in PostGIS (which DRDLR should be using :-) ) would be

SELECT * FROM mytable
WHERE ST_NumGeometries(geom) = 1 - - this will exclude multipolygons
            AND ST_NumInteriorRings(geom) = 0 - - this will exclude polygons with holes (interior rings)

Gavin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20180613/55f0dcd1/attachment.html>


More information about the Africa mailing list