<?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: Creating / updating feature layer in ArcGIS Online from geopandas GeoDataFrame? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-updating-feature-layer-in-arcgis-online/m-p/1013444#M5375</link>
    <description>&lt;P&gt;There is a method using the arcgis api:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GeoAccessor.from_geodataframe(geo_df, inplace=False, column_name='SHAPE')&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 03 Jan 2021 15:58:32 GMT</pubDate>
    <dc:creator>ErickFox</dc:creator>
    <dc:date>2021-01-03T15:58:32Z</dc:date>
    <item>
      <title>Creating / updating feature layer in ArcGIS Online from geopandas GeoDataFrame?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-updating-feature-layer-in-arcgis-online/m-p/790989#M1585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it at all possible to create a feature layer in ArcGIS Online from a GeoDataFrame? If you cannot create a feature layer directly from a &lt;SPAN&gt;GeoDataFrame&lt;/SPAN&gt;, is it possible to populate an existing feature layer from a &lt;SPAN&gt;GeoDataFrame (provided the fields match of course).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried all sorts of methods to create a feature layer directly using GeoJSON as the intermediary &amp;nbsp;- no luck. So then I tried to insert values (attributes and geometry) from a&amp;nbsp;GeoDataFrame into an existing feature layer in AGOL, using&amp;nbsp;GeoDataFrame.to_dict and then trying to add that dictionary to the feature layer using&amp;nbsp;edit_features(adds=&amp;lt;my dictionary created from the GeoDataFrame&amp;gt;). No luck there either.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyone knows how this can be done?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hugo&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2019 07:21:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-updating-feature-layer-in-arcgis-online/m-p/790989#M1585</guid>
      <dc:creator>HugoBouckaert1</dc:creator>
      <dc:date>2019-02-14T07:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Creating / updating feature layer in ArcGIS Online from geopandas GeoDataFrame?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-updating-feature-layer-in-arcgis-online/m-p/790990#M1586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep you can using this method:&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2019 14:36:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-updating-feature-layer-in-arcgis-online/m-p/790990#M1586</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-09-23T14:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating / updating feature layer in ArcGIS Online from geopandas GeoDataFrame?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-updating-feature-layer-in-arcgis-online/m-p/790991#M1587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a method I wrote for GeoDataFrame to return an arcgis spatially-enabled dataframe (SEDF):&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; warnings
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; Geometry
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;features &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GeoAccessor&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; GeoSeriesAccessor
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; pandas &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; DataFrame
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; geopandas &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GeoDataFrame

&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;to_SpatialDataFrame&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; spatial_reference&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;None&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"""Returns an arcgis spatially-enabled data frame.

    Arguments:
    spatial_reference  Either None or a spatial reference integer code.
                       If None, the spatial reference will be extracted
                       from the GeoDataFrame if it is defined using an
                       EPSG code.
    """&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; spatial_reference&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        crs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;crs
        epsg_code &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; crs&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;to_epsg&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; epsg_code&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            spatial_reference &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'wkid'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; epsg_code&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            spatial_reference &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'wkid'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4326&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
            warnings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;warn&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Unable to extract a spatial reference, assuming latitude/longitude (EPSG 4326).'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        spatial_reference &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'wkid'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; spatial_reference&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

    sdf &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; DataFrame&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;data&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;drop&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; axis&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    sdf&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'SHAPE'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;Geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;from_shapely&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;g&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; spatial_reference&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; g &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;tolist&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
    sdf&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatial&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;set_geometry&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'SHAPE'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; sdf

GeoDataFrame&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;to_SpatialDataFrame &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; to_SpatialDataFrame
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The resulting SEDF can then be published&amp;nbsp;or used to update an existing feature layer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:03:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-updating-feature-layer-in-arcgis-online/m-p/790991#M1587</guid>
      <dc:creator>J_R_Matchett</dc:creator>
      <dc:date>2021-12-12T09:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Creating / updating feature layer in ArcGIS Online from geopandas GeoDataFrame?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-updating-feature-layer-in-arcgis-online/m-p/790992#M1588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's very interesting, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2020 01:13:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-updating-feature-layer-in-arcgis-online/m-p/790992#M1588</guid>
      <dc:creator>HugoBouckaert1</dc:creator>
      <dc:date>2020-07-09T01:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Creating / updating feature layer in ArcGIS Online from geopandas GeoDataFrame?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-updating-feature-layer-in-arcgis-online/m-p/1013444#M5375</link>
      <description>&lt;P&gt;There is a method using the arcgis api:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GeoAccessor.from_geodataframe(geo_df, inplace=False, column_name='SHAPE')&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 03 Jan 2021 15:58:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-updating-feature-layer-in-arcgis-online/m-p/1013444#M5375</guid>
      <dc:creator>ErickFox</dc:creator>
      <dc:date>2021-01-03T15:58:32Z</dc:date>
    </item>
  </channel>
</rss>

