<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Multipart polygons (or polygons with holes) in Oracle Spatial do not appear in ArcMap in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/multipart-polygons-or-polygons-with-holes-in/m-p/585247#M33064</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In our Oracle (11g) schema, we have several tables with SDO_GEOMETRY columns.&amp;nbsp; The tables are used by our application through simple CRUD operations.&amp;nbsp; It is a requirement, however, that the data be registerable with ArcSDE and viewable with ArcMap, so I'm in the processing of verifying that it can be done.&amp;nbsp; We are having a problem, however, in that any shapes inserted with multiple parts (or with holes) will not appear in ArcMap and are not selectable in the attribute table for the layer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an example of what we're doing, here is the definition for one of the tables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; CREATE TABLE "USSF_MICHAELD"."F_HEALTH_PLAN" 
&amp;nbsp;&amp;nbsp; ( "FHP_ID" NUMBER(38,0) NOT NULL ENABLE, 
 "FHP_PLAN_POLYGON" "MDSYS"."SDO_GEOMETRY" , 
 "LEGAL_DESC" VARCHAR2(1000 CHAR), 
 "PROPERTY_DESC" VARCHAR2(1000 CHAR), 
 "CALCED_ACRES" NUMBER(38,8), 
 "RECORDED_ACRES" NUMBER(38,8), 
&amp;nbsp; CONSTRAINT "F_HEALTH_PLAN_PK" PRIMARY KEY ("FHP_ID")
&amp;nbsp; USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
&amp;nbsp; STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
&amp;nbsp; PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
&amp;nbsp; TABLESPACE "USSF_TABLESPACE"&amp;nbsp; ENABLE
&amp;nbsp;&amp;nbsp; ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
&amp;nbsp; STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
&amp;nbsp; PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
&amp;nbsp; TABLESPACE "USSF_TABLESPACE" ;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've inserted metadata for each table into the requisite Oracle tables, and created spatial indices:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO)
&amp;nbsp;&amp;nbsp; VALUES ('F_HEALTH_PLAN', 'FHP_PLAN_POLYGON',
&amp;nbsp;&amp;nbsp; SDO_DIM_ARRAY
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SDO_DIM_ELEMENT('X', -20037700, 20037700, 0.1),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SDO_DIM_ELEMENT('Y', -20037700, 20037700, 0.1))
&amp;nbsp;&amp;nbsp; )
;

CREATE INDEX SPIX_F_HEALTH_PLAN ON F_HEALTH_PLAN(FHP_PLAN_POLYGON)
&amp;nbsp; INDEXTYPE IS mdsys.spatial_index
;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And I've registered the table as a feature class with ArcSDE with the following command:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;sdelayer -o register -l F_HEALTH_PLAN,FHP_PLAN_POLYGON -e na+ -C FHP_ID -i sde:oracle11g -s fhbXen -u USSF_MICHAELD -p 84867AC24TD0u72@orcl -t SDO_GEOMETRY -P High -G file="C:\Projections\WGS 1984 Web Mercator (Auxiliary Sphere).prj"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The feature class appears under the appropriate database connection in ArcMap, and I can add it as a layer to a new map.&amp;nbsp; When I add data to it through our application, I can see that data in ArcMap.&amp;nbsp; I can select it.&amp;nbsp; I can interact with it.&amp;nbsp; I can see the attribute data.&amp;nbsp; However, as stated earlier, if that data has multiple parts or has any holes, the record becomes unselectable and is does not appear.&amp;nbsp; Any ideas on what the problem may be?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(If it's of any use, when inserting data, we are using the SDO_GEOMETRY constructor which takes a WKT)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 01:09:48 GMT</pubDate>
    <dc:creator>MichaelDamrath</dc:creator>
    <dc:date>2021-12-12T01:09:48Z</dc:date>
    <item>
      <title>Multipart polygons (or polygons with holes) in Oracle Spatial do not appear in ArcMap</title>
      <link>https://community.esri.com/t5/data-management-questions/multipart-polygons-or-polygons-with-holes-in/m-p/585247#M33064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In our Oracle (11g) schema, we have several tables with SDO_GEOMETRY columns.&amp;nbsp; The tables are used by our application through simple CRUD operations.&amp;nbsp; It is a requirement, however, that the data be registerable with ArcSDE and viewable with ArcMap, so I'm in the processing of verifying that it can be done.&amp;nbsp; We are having a problem, however, in that any shapes inserted with multiple parts (or with holes) will not appear in ArcMap and are not selectable in the attribute table for the layer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an example of what we're doing, here is the definition for one of the tables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; CREATE TABLE "USSF_MICHAELD"."F_HEALTH_PLAN" 
&amp;nbsp;&amp;nbsp; ( "FHP_ID" NUMBER(38,0) NOT NULL ENABLE, 
 "FHP_PLAN_POLYGON" "MDSYS"."SDO_GEOMETRY" , 
 "LEGAL_DESC" VARCHAR2(1000 CHAR), 
 "PROPERTY_DESC" VARCHAR2(1000 CHAR), 
 "CALCED_ACRES" NUMBER(38,8), 
 "RECORDED_ACRES" NUMBER(38,8), 
&amp;nbsp; CONSTRAINT "F_HEALTH_PLAN_PK" PRIMARY KEY ("FHP_ID")
&amp;nbsp; USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
&amp;nbsp; STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
&amp;nbsp; PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
&amp;nbsp; TABLESPACE "USSF_TABLESPACE"&amp;nbsp; ENABLE
&amp;nbsp;&amp;nbsp; ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
&amp;nbsp; STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
&amp;nbsp; PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
&amp;nbsp; TABLESPACE "USSF_TABLESPACE" ;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've inserted metadata for each table into the requisite Oracle tables, and created spatial indices:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO)
&amp;nbsp;&amp;nbsp; VALUES ('F_HEALTH_PLAN', 'FHP_PLAN_POLYGON',
&amp;nbsp;&amp;nbsp; SDO_DIM_ARRAY
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SDO_DIM_ELEMENT('X', -20037700, 20037700, 0.1),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SDO_DIM_ELEMENT('Y', -20037700, 20037700, 0.1))
&amp;nbsp;&amp;nbsp; )
;

CREATE INDEX SPIX_F_HEALTH_PLAN ON F_HEALTH_PLAN(FHP_PLAN_POLYGON)
&amp;nbsp; INDEXTYPE IS mdsys.spatial_index
;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And I've registered the table as a feature class with ArcSDE with the following command:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;sdelayer -o register -l F_HEALTH_PLAN,FHP_PLAN_POLYGON -e na+ -C FHP_ID -i sde:oracle11g -s fhbXen -u USSF_MICHAELD -p 84867AC24TD0u72@orcl -t SDO_GEOMETRY -P High -G file="C:\Projections\WGS 1984 Web Mercator (Auxiliary Sphere).prj"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The feature class appears under the appropriate database connection in ArcMap, and I can add it as a layer to a new map.&amp;nbsp; When I add data to it through our application, I can see that data in ArcMap.&amp;nbsp; I can select it.&amp;nbsp; I can interact with it.&amp;nbsp; I can see the attribute data.&amp;nbsp; However, as stated earlier, if that data has multiple parts or has any holes, the record becomes unselectable and is does not appear.&amp;nbsp; Any ideas on what the problem may be?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(If it's of any use, when inserting data, we are using the SDO_GEOMETRY constructor which takes a WKT)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:09:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/multipart-polygons-or-polygons-with-holes-in/m-p/585247#M33064</guid>
      <dc:creator>MichaelDamrath</dc:creator>
      <dc:date>2021-12-12T01:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygons (or polygons with holes) in Oracle Spatial do not appear in Ar</title>
      <link>https://community.esri.com/t5/data-management-questions/multipart-polygons-or-polygons-with-holes-in/m-p/585248#M33065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you used Oracle's tools for validting the geometry topology? Internal rings&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in WKT must be wrapped clockwise (SDO_GEOMETRY is left-hand rule).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check the ArcSDE logs to see if there are geometry errors...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW: Please edit your post to remove password information -- no one here needs that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 16:23:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/multipart-polygons-or-polygons-with-holes-in/m-p/585248#M33065</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2012-04-18T16:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygons (or polygons with holes) in Oracle Spatial do not appear in Ar</title>
      <link>https://community.esri.com/t5/data-management-questions/multipart-polygons-or-polygons-with-holes-in/m-p/585249#M33066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Have you used Oracle's tools for validting the geometry topology? Internal rings&lt;BR /&gt;in WKT must be wrapped clockwise (SDO_GEOMETRY is left-hand rule).&lt;BR /&gt;&lt;BR /&gt;Check the ArcSDE logs to see if there are geometry errors...&lt;BR /&gt;&lt;BR /&gt;- V&lt;BR /&gt;&lt;BR /&gt;BTW: Please edit your post to remove password information -- no one here needs that.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll give that a go.&amp;nbsp; Not terribly familiar with those tools, so it hadn't occurred to me.&amp;nbsp; I think it's worth noting that we haven't had any problems retrieving the data (GET_WKT() function mostly) and displaying it in Openlayers, as well as using it in queries with SDO_RELATE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All the passwords, usernames, tables names, and column names above are fake, BTW.&amp;nbsp; Just there to give complete looking examples.&amp;nbsp; I can remove if it makes you more comfortable.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 16:53:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/multipart-polygons-or-polygons-with-holes-in/m-p/585249#M33066</guid>
      <dc:creator>MichaelDamrath</dc:creator>
      <dc:date>2012-04-18T16:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygons (or polygons with holes) in Oracle Spatial do not appear in Ar</title>
      <link>https://community.esri.com/t5/data-management-questions/multipart-polygons-or-polygons-with-holes-in/m-p/585250#M33067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you're loading geometry on your own, then you have to be able to validate the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;construction on your own.&amp;nbsp; Oracle doesn't enforce topology rules on insert because&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the detection tools need loaded data, but ArcSDE does enforce ring orientation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(errors should be logged in $SDEHOME/etc).&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't had to use Oracle's tools much because I usually have access to the API &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;functions, but all you really need is a parser and a function to calculate area via the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;trapezoid rule across the array of segment vertex pairs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The least confusing way to make up connection parameters is to just use "server",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"instance", "database", "user" and "password" for the respective values (something &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;like "notThePassword" is a close second).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 18:30:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/multipart-polygons-or-polygons-with-holes-in/m-p/585250#M33067</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2012-04-18T18:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Multipart polygons (or polygons with holes) in Oracle Spatial do not appear in Ar</title>
      <link>https://community.esri.com/t5/data-management-questions/multipart-polygons-or-polygons-with-holes-in/m-p/585251#M33068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There weren't any errors that I could spot in the SDE logs, so I tried Oracle's SDO_GEOM.VALIDATE_GEOMETRY function.&amp;nbsp; It failed with an error like "Unable to construct geometry object".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Fortunately, there is another Oracle function, SDO_UTIL.RECTIFY_GEOMETRY, that seems to have done the trick.&amp;nbsp; Since two of the three things that function fixes were unlikely to be the issue, I assume it had something to do with the ring orientation for the multipart shapes.&amp;nbsp; Once I ran that function on our data, everything worked fine in ArcMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the guidance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2012 11:53:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/multipart-polygons-or-polygons-with-holes-in/m-p/585251#M33068</guid>
      <dc:creator>MichaelDamrath</dc:creator>
      <dc:date>2012-04-26T11:53:50Z</dc:date>
    </item>
  </channel>
</rss>

