<?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 Re: &amp;quot;Polygon shell has no area&amp;quot; when view added from PostgreSQL in ArcMap Questions</title>
    <link>https://community.esri.com/t5/arcmap-questions/quot-polygon-shell-has-no-area-quot-when-view/m-p/697150#M1434</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually used this method to generate the geometry: &lt;A class="link-titled" href="https://gis.stackexchange.com/questions/142391/storing-geojson-featurecollection-to-postgresql-with-postgis" title="https://gis.stackexchange.com/questions/142391/storing-geojson-featurecollection-to-postgresql-with-postgis"&gt;Storing GeoJSON FeatureCollection to PostgreSQL with PostGIS? - Geographic Information Systems Stack Exchange&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 May 2020 15:43:39 GMT</pubDate>
    <dc:creator>ThomasPuthusserry</dc:creator>
    <dc:date>2020-05-15T15:43:39Z</dc:date>
    <item>
      <title>"Polygon shell has no area" when view added from PostgreSQL</title>
      <link>https://community.esri.com/t5/arcmap-questions/quot-polygon-shell-has-no-area-quot-when-view/m-p/697149#M1433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have geojson derived from a catchment API stored in a postgres. Using a st_transform function a geometry field is added in a view as per the code below. The resulting view works fine in QGIS however it fails to load when added to ArcMap /Pro. The issue only happens when features contain complex polygons (donut shapes), no issues when the polygon is simple. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This issue seems recent, as I have been using this for over three years now and always the complex polygons were visible within Arc. as anything changed recently?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can share actual data if that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OR REPLACE VIEW public.travel_times_test&lt;BR /&gt;&amp;nbsp;AS&lt;BR /&gt;&amp;nbsp;WITH data AS (&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT travel_data_new.id,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; travel_data_new.type,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; travel_data_new."time",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; travel_data_new.postcode,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; travel_data_new.project,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; travel_data_new.data::json AS fc&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM travel_data_new&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp;SELECT row_number() OVER () AS objectid,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.id,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.postcode,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.type,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.project,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f."time",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; st_transform(st_setsrid(st_geomfromgeojson(f.feat -&amp;gt;&amp;gt; 'geometry'::text), 4326), 3785) AS geom&lt;BR /&gt;&amp;nbsp;&amp;nbsp; FROM ( SELECT json_array_elements(data.fc -&amp;gt; 'features'::text) AS feat,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data.id,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data.type,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data."time",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data.project,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data.postcode&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM data) f;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALTER TABLE public.travel_times_test&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OWNER TO gwkgis2016;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2020 15:42:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/quot-polygon-shell-has-no-area-quot-when-view/m-p/697149#M1433</guid>
      <dc:creator>ThomasPuthusserry</dc:creator>
      <dc:date>2020-05-15T15:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: "Polygon shell has no area" when view added from PostgreSQL</title>
      <link>https://community.esri.com/t5/arcmap-questions/quot-polygon-shell-has-no-area-quot-when-view/m-p/697150#M1434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually used this method to generate the geometry: &lt;A class="link-titled" href="https://gis.stackexchange.com/questions/142391/storing-geojson-featurecollection-to-postgresql-with-postgis" title="https://gis.stackexchange.com/questions/142391/storing-geojson-featurecollection-to-postgresql-with-postgis"&gt;Storing GeoJSON FeatureCollection to PostgreSQL with PostGIS? - Geographic Information Systems Stack Exchange&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2020 15:43:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/quot-polygon-shell-has-no-area-quot-when-view/m-p/697150#M1434</guid>
      <dc:creator>ThomasPuthusserry</dc:creator>
      <dc:date>2020-05-15T15:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: "Polygon shell has no area" when view added from PostgreSQL</title>
      <link>https://community.esri.com/t5/arcmap-questions/quot-polygon-shell-has-no-area-quot-when-view/m-p/1260141#M4316</link>
      <description>&lt;PRE&gt;SG_ZERO_AREA_POLYGON         (-2032)     Polygon shell has no area  &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Are you sure this was related to donut shapes and not empty geometries? I am encountering this issue (above code) at a low-percentage rate when dealing with data sourced from Open Street Maps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I take a close look at them they all have one thing in common: All x- or y-coordinates of a multi-part polygon share the same value (see image). Thus leading to a line aka empty polygon.&lt;/P&gt;&lt;P&gt;I am trying to insert into a PostgreSQL Enterprise Geodatabase (using st_geometry) but these records fail. Anything I can do here to get them to load in? I.e. casting or transforming...? Thinking of looping through and checking the area value of each polygon within a multi-polygon. If 0, then remove it, so at least the rest of the multi-polygon loads in and it doesn't prevent the whole insert.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here are a few offenders:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZarticoGIS_0-1677001599381.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/63315iED1E2D145C44E9B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZarticoGIS_0-1677001599381.png" alt="ZarticoGIS_0-1677001599381.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/8128"&gt;@ThomasPuthusserry&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 20:44:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/quot-polygon-shell-has-no-area-quot-when-view/m-p/1260141#M4316</guid>
      <dc:creator>Zartico-GIS</dc:creator>
      <dc:date>2023-02-21T20:44:41Z</dc:date>
    </item>
  </channel>
</rss>

