<?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 Overwriting a Feature Layer from SpatialDataFrame Data Source in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-a-feature-layer-from-spatialdataframe/m-p/816386#M2670</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to update / overwrite a Feature Layer using the ArcGIS API for Python.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;am currently loading and manipulating the&amp;nbsp;data in a SpatialDataFrame and I have published the data using `sdf.spatial.to_featurelayer()`.&amp;nbsp; This function creates a shapefile and the resulting Feature Layer.&amp;nbsp; However, the data is going to be updating and changing on maybe a weekly basis.&amp;nbsp; I could delete the layer and simply recreate it, but there is a good chance that the layer will be part of a StoryMap or some other AGOL web map, so that is not an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a good tutorial on how to overwrite a Feature Layer using pandas and a CSV here:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/python/sample-notebooks/overwriting-feature-layers/" title="https://developers.arcgis.com/python/sample-notebooks/overwriting-feature-layers/"&gt;overwriting_feature_layers | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;, but this depends on having the data in CSV format and utilizes the pandas `read_csv()` method, which does not have read_shapefile() equivalent.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The `manager.overwrite()` method does not accept SDF format (though that would be super cool), so I think the best way to do it is probably updating the underlying shapefile and then overwriting from there.&amp;nbsp; Any ideas on how to do that or any other ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Nov 2018 16:51:17 GMT</pubDate>
    <dc:creator>NathanielEvatt</dc:creator>
    <dc:date>2018-11-27T16:51:17Z</dc:date>
    <item>
      <title>Overwriting a Feature Layer from SpatialDataFrame Data Source</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-a-feature-layer-from-spatialdataframe/m-p/816386#M2670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to update / overwrite a Feature Layer using the ArcGIS API for Python.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;am currently loading and manipulating the&amp;nbsp;data in a SpatialDataFrame and I have published the data using `sdf.spatial.to_featurelayer()`.&amp;nbsp; This function creates a shapefile and the resulting Feature Layer.&amp;nbsp; However, the data is going to be updating and changing on maybe a weekly basis.&amp;nbsp; I could delete the layer and simply recreate it, but there is a good chance that the layer will be part of a StoryMap or some other AGOL web map, so that is not an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a good tutorial on how to overwrite a Feature Layer using pandas and a CSV here:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/python/sample-notebooks/overwriting-feature-layers/" title="https://developers.arcgis.com/python/sample-notebooks/overwriting-feature-layers/"&gt;overwriting_feature_layers | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;, but this depends on having the data in CSV format and utilizes the pandas `read_csv()` method, which does not have read_shapefile() equivalent.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The `manager.overwrite()` method does not accept SDF format (though that would be super cool), so I think the best way to do it is probably updating the underlying shapefile and then overwriting from there.&amp;nbsp; Any ideas on how to do that or any other ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2018 16:51:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-a-feature-layer-from-spatialdataframe/m-p/816386#M2670</guid>
      <dc:creator>NathanielEvatt</dc:creator>
      <dc:date>2018-11-27T16:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting a Feature Layer from SpatialDataFrame Data Source</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-a-feature-layer-from-spatialdataframe/m-p/816387#M2671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case anyone else tries to do the same, it turned out to be easier to simply update / add / delete using the edit_features functionality as described in the following ESRI guides:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/python/sample-notebooks/updating-features-in-a-feature-layer/" title="https://developers.arcgis.com/python/sample-notebooks/updating-features-in-a-feature-layer/"&gt;updating_features_in_a_feature_layer | ArcGIS for Developers&lt;/A&gt;&amp;nbsp; and&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/python/guide/editing-features/" title="https://developers.arcgis.com/python/guide/editing-features/"&gt;Editing Features | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Kind of a bummer because I need to manage all the data updates individually instead of simply rewriting, but this solution is definitely the most efficient.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2018 22:31:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-a-feature-layer-from-spatialdataframe/m-p/816387#M2671</guid>
      <dc:creator>NathanielEvatt</dc:creator>
      <dc:date>2018-12-06T22:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting a Feature Layer from SpatialDataFrame Data Source</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-a-feature-layer-from-spatialdataframe/m-p/816388#M2672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nathaniel, thanks for sharing your feedback. Did you try to do the same with GeoJSON hosted Feature Layer? I'm trying to use&amp;nbsp;&lt;STRONG style="font-family: 'courier new', courier, monospace; "&gt;flayer_collection.manager.overwrite()&lt;/STRONG&gt;from the Jupyter notebook. I get the&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;{'success': True}&lt;/STRONG&gt;&lt;/SPAN&gt; response, the modified date in AGOL metadata is updated but the actual data is still the same... I'm using a web GeoJSON ('http://www.gdacs.org/xml/archive.geojson').&lt;/P&gt;&lt;P&gt;Does anyone have any idea why the data is not getting updated? It gets updated without any problems via AGOL web interface...&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2019 10:45:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-a-feature-layer-from-spatialdataframe/m-p/816388#M2672</guid>
      <dc:creator>JanBurdziej</dc:creator>
      <dc:date>2019-05-22T10:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting a Feature Layer from SpatialDataFrame Data Source</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-a-feature-layer-from-spatialdataframe/m-p/1062969#M6145</link>
      <description>&lt;P&gt;Hi Jan, did you end up finding out a work around or reason why the&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;flayer_collection.manager.overwrite() &lt;/STRONG&gt;method did not work?&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 17:09:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-a-feature-layer-from-spatialdataframe/m-p/1062969#M6145</guid>
      <dc:creator>AhnaMiller2</dc:creator>
      <dc:date>2021-05-28T17:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Overwriting a Feature Layer from SpatialDataFrame Data Source</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-a-feature-layer-from-spatialdataframe/m-p/1160020#M7267</link>
      <description>&lt;P&gt;I've been experiencing a very similar issue. My process in jupyter imports the feature layer from AGOL, drops a field using json, performs a join with another AGOL layer to append the current version of the field, then overwrites the original layer in AGOL. Dropping and adding fields does change the target AGOL layer, but overwriting doesn't perform as expected.&lt;/P&gt;&lt;P&gt;The same number of rows are preserved in the target layer even though there should be more. Puzzlingly, the modified field does show changes. I'm looking into "upsert/append" as a solution instead.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 18:52:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/overwriting-a-feature-layer-from-spatialdataframe/m-p/1160020#M7267</guid>
      <dc:creator>ASTINE-C</dc:creator>
      <dc:date>2022-03-31T18:52:21Z</dc:date>
    </item>
  </channel>
</rss>

