<?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: Geometry precision issue when using SDF in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049584#M5954</link>
    <description>&lt;P data-unlink="true"&gt;Found a similar post on&amp;nbsp;&lt;A href="https://gis.stackexchange.com/questions/321518/rounding-coordinates-to-5-decimals-in-geopandas/394456#394456" target="_self"&gt;stackexchange.com&lt;/A&gt;. However, it uses geopandas and shapely which I am not familiar with. In fact, I am fairly new to Python and ArcGIS API too! I guess the solution may be applied to pandas.DataFrame.spatial too. Any suggestions or help is appreciated!&lt;/P&gt;&lt;P data-unlink="true"&gt;Ming&lt;/P&gt;</description>
    <pubDate>Wed, 21 Apr 2021 14:52:59 GMT</pubDate>
    <dc:creator>MingHome</dc:creator>
    <dc:date>2021-04-21T14:52:59Z</dc:date>
    <item>
      <title>Geometry precision issue when using SDF</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049235#M5943</link>
      <description>&lt;P&gt;Dear Python and SDF experts,&lt;/P&gt;&lt;P&gt;I encountered an issue when using SDF/SeDF.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two supposedly identical datasets in both local FGDB (featureclass) and AGOL (hosted featurelayer).&amp;nbsp; To keep both datasets in sync, I am using Pandas and Spatial DataFrame to compare two dataset and to identify any difference in attributes and/or geometry/Shape. If the changes are detected in source dataset, I will modify the target dataset accordingly. It is tested great for all the attributes. However, there is an issue to compare the geometry/SHAPE field between two "supposedly identical" SDF created from gdb and agol.&lt;/P&gt;&lt;P&gt;I found that the precision of coordinators would be altered after a feature is copied/published from FGDB to AGOL, or vice versa. Although the difference is tinny, 9th or 10th digits after decimal, it failed to pass the "identical test" with SDF merge operation. Below is a example:&lt;/P&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&lt;EM&gt;SHAPE column of Line feature created in FGDB:&amp;nbsp;&lt;/EM&gt;&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; {'paths': [[[1371391.9402663112, 549074.1051290631], [1371627.089730382, 547898.3574805558], ... ...&lt;/EM&gt;&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Copied to AGOL:&lt;/EM&gt;&lt;/FONT&gt;&lt;/H6&gt;&lt;H6&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;{'paths': [[[1371391.94026631, 549074.105129063], [1371627.08973038, 547898.357480556], ... ...&lt;/EM&gt;&lt;/FONT&gt;&lt;/H6&gt;&lt;P&gt;Does any one encountered&amp;nbsp;similar issue? and know how to resolve this issue?&lt;/P&gt;&lt;P&gt;I thought of using the Pandas.dataframe.round("SHAPE",8) function to round the decimal of the SHAPE coodinators to 8 or even less. However, it seem that the SHAPE in sdf is not a "number" type and the round would not work if I direct use the round function against "SHAPE". Any thoughts and suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ming&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 16:59:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049235#M5943</guid>
      <dc:creator>MingHome</dc:creator>
      <dc:date>2021-04-20T16:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry precision issue when using SDF</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049252#M5945</link>
      <description>&lt;P&gt;At a glance, I would assume that the two data sources have different &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/the-properties-of-a-spatial-reference.htm#GUID-FFE1E21B-A459-4AC7-A8C5-222C0341A9AE" target="_self"&gt;spatial resolutions&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;You should be able to load both layers into Pro and check their spatial references there. You can also go to &lt;STRONG&gt;rest-service-url/0?f=json&lt;/STRONG&gt; and look for the resolution in the properties listed.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 17:14:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049252#M5945</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-04-20T17:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry precision issue when using SDF</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049283#M5946</link>
      <description>&lt;P&gt;It seems that the spatial resolution and precision settings are the same, they should be set to double-precision. In fact, I published the featureclass from fgdb to agol.&amp;nbsp; However, it seems that the coordinates stored in FGDB is 18 bytes (length in 18 digits, including the decimal), butin agol is 16 bytes for polyline (18 bytes for points!). I am not for sure if there is a way to set the coordinates to 16 bytes in fgdb.&lt;/P&gt;&lt;P&gt;Thanks for reply!&lt;/P&gt;&lt;P&gt;Ming&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 17:52:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049283#M5946</guid>
      <dc:creator>MingHome</dc:creator>
      <dc:date>2021-04-20T17:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry precision issue when using SDF</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049345#M5947</link>
      <description>&lt;P&gt;Thanks for the tip!&lt;/P&gt;&lt;P&gt;The xy resolution of both dataset is exactly the same: 0.000328083333333333 US Survey Feet&lt;/P&gt;&lt;P&gt;Mng&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 20:34:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049345#M5947</guid>
      <dc:creator>MingHome</dc:creator>
      <dc:date>2021-04-20T20:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry precision issue when using SDF</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049352#M5948</link>
      <description>&lt;P&gt;&amp;nbsp;is the coordinate system of both the same? and if so, what is it?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 20:42:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049352#M5948</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-20T20:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry precision issue when using SDF</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049353#M5949</link>
      <description>&lt;P&gt;I can't see a way around this...&lt;/P&gt;&lt;P&gt;In our process of updating layers back and forth, we just use the "last updated" editor tracking timestamp as a signal to update all attributes &lt;EM&gt;and&lt;/EM&gt; geometry, since there wasn't a reliably consistent way to pick out the true differences in the shape field.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 20:44:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049353#M5949</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-04-20T20:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry precision issue when using SDF</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049391#M5950</link>
      <description>&lt;P&gt;Yes, both is 'spatialReference': {'wkid': 102723, 'latestWkid': 3735}&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 21:53:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049391#M5950</guid>
      <dc:creator>MingHome</dc:creator>
      <dc:date>2021-04-20T21:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry precision issue when using SDF</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049584#M5954</link>
      <description>&lt;P data-unlink="true"&gt;Found a similar post on&amp;nbsp;&lt;A href="https://gis.stackexchange.com/questions/321518/rounding-coordinates-to-5-decimals-in-geopandas/394456#394456" target="_self"&gt;stackexchange.com&lt;/A&gt;. However, it uses geopandas and shapely which I am not familiar with. In fact, I am fairly new to Python and ArcGIS API too! I guess the solution may be applied to pandas.DataFrame.spatial too. Any suggestions or help is appreciated!&lt;/P&gt;&lt;P data-unlink="true"&gt;Ming&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 14:52:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049584#M5954</guid>
      <dc:creator>MingHome</dc:creator>
      <dc:date>2021-04-21T14:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry precision issue when using SDF</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049591#M5955</link>
      <description>&lt;P&gt;shapely is used by both (Geopandas is built on top of Pandas)&lt;/P&gt;&lt;P&gt;if arcpy isn't used for geometry shapely is used for the geometry stuff&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 14:59:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1049591#M5955</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-21T14:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry precision issue when using SDF</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1050363#M5960</link>
      <description>&lt;P&gt;Finally, I found solution to this issue!&lt;/P&gt;&lt;P&gt;In this case, what we care is really NOT the precision of the coordinates, rather, is compare value with limited precision (8 decimals should work). Therefore, I added a new column with the string type of the “SHAPE data” in both sdf. Then, use the “regular expressions” to round all the numbers in string to 8 decimals. Finally use the “new string column” for “merge operation”. It works!&lt;/P&gt;&lt;P&gt;Thanks for&amp;nbsp;&lt;SPAN&gt;Josh Carlson and Dan for you inputs!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ming&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 20:51:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1050363#M5960</guid>
      <dc:creator>MingHome</dc:creator>
      <dc:date>2021-04-22T20:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry precision issue when using SDF</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1050616#M5965</link>
      <description>&lt;P&gt;Oh, very interesting workaround! Glad you found a solution!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 13:01:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/geometry-precision-issue-when-using-sdf/m-p/1050616#M5965</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-04-23T13:01:32Z</dc:date>
    </item>
  </channel>
</rss>

