<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Mike<div class=""><br class=""></div><div class="">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</div><div class=""><br class=""></div><div class="">SELECT * FROM mytable </div><div class="">WHERE ST_NumGeometries(geom) = 1 - - this will exclude multipolygons</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>AND ST_NumInteriorRings(geom) = 0 - - this will exclude polygons with holes (interior rings)</div><div class=""><br class=""></div><div class="">Gavin</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 26 Mar 2018, at 09:44, Mike Caister <<a href="mailto:Mike.Caister@drdlr.gov.za" class="">Mike.Caister@drdlr.gov.za</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">Hi,<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">I need help with structuring a SQL statement to query out data from an Oracle database, using SQL Developer. I want to query out entities that have only one boundary, as opposed to entities that have disjointed boundaries, or have islands.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">I have tried to write queries that use the difference in structure of the SDO_GEOMETRY field, between entities with one boundary only, as opposed to entries with multiple boundaries or islands. Is this the route to follow, or is there a simpler method?<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">Typically, the SDO_GEOMETRY of entities that have multiple islands starts like this:<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">MDSYS.SDO_GEOMETRY(2003,NULL,MDSYS.SDO_POINT_TYPE(NULL,NULL,NULL),</span><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1,931,2003,1),MDSYS.SDO_ORDINATE_ARRAY( . . .,<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">whereas SDO_GEOMETRY of entities that have no islands starts like this:<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">MDSYS.SDO_GEOMETRY(2003,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),MDSYS.SDO_ORDINATE_ARRAY( . . .<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">Any suggestions would be welcome.<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">Regards,<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class=""><span style="font-size: 12pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">Mike Caister<o:p class=""></o:p></span></b></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class=""><span style="font-size: 8pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class=""><o:p class=""> </o:p></span></b></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">Spatial Database Manager<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">Survey Technician ST1397<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">Office of the Surveyor General: KwaZulu-Natal<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">300 Pietermaritz Street<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">PO Box 396<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">Pietermaritzburg<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">3200<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 8pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 8pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">Email:   <span class="Apple-converted-space"> </span></span><span style="color: rgb(68, 84, 106);" class=""><a href="mailto:macaister@sgkzn.gov.za" style="color: rgb(149, 79, 114); text-decoration: underline;" class=""><span style="font-size: 8pt; font-family: Tahoma, sans-serif; color: blue;" class="">Mike.Caister@drdlr.gov.za</span></a></span><span style="font-size: 8pt; font-family: Tahoma, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">Tel:      033 355 2929<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: rgb(68, 84, 106);" class="">Fax:      033 394 7610<b class=""><o:p class=""></o:p></b></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="color: rgb(68, 84, 106);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Africa mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="mailto:Africa@lists.osgeo.org" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Africa@lists.osgeo.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">You can UNSUBSCRIBE at<span class="Apple-converted-space"> </span></span><a href="https://lists.osgeo.org/mailman/listinfo/africa" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://lists.osgeo.org/mailman/listinfo/africa</a></div></blockquote></div><br class=""></div></body></html>