<?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 a SDEF from Geopandas using GeoAccessor gives wrong crs in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037697#M5742</link>
    <description>&lt;P&gt;Yeah, I checked all that.&lt;BR /&gt;&lt;BR /&gt;Putting gdf.crs() gets epsg:27700 returned, but print out sdf gets this&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;_prepare_from_string(" ".join(pjargs)) datecreated ... SHAPE 0 2008/07/10 00:00:00 ... {"rings": [[[-0.07844650101657248, 51.46935646... 1 2008/07/10 00:00:00 ... {"rings": [[[-1.7625062007924153, 52.107322561... 2 2008/07/10 00:00:00 ... {"rings": [[[-0.1856100811699591, 51.462464098...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So it's actually converted it to 4326?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Mar 2021 17:07:02 GMT</pubDate>
    <dc:creator>PaulHallett1305</dc:creator>
    <dc:date>2021-03-17T17:07:02Z</dc:date>
    <item>
      <title>Creating a SDEF from Geopandas using GeoAccessor gives wrong crs</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037664#M5740</link>
      <description>&lt;P&gt;I am loading from pandas to geopandas to then sue the GeoAccessor to load data in, the code is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;            df['geometry'] = df['geometry'].apply(wkt.loads)
            gdf = gpd.GeoDataFrame(df, geometry='geometry', crs='epsg:27700')
            sdf = GeoAccessor.from_geodataframe(gdf, True, column_name='SHAPE')
            df_spatial_fc = sdf.spatial.to_featurelayer(
                title=self.layer_name,
                gis=self.gis,
                tags=tags)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I check the crs in the layer, it states it is&amp;nbsp;3857 (102100).&amp;nbsp; It's leading to anomalies in the display of the data.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 16:35:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037664#M5740</guid>
      <dc:creator>PaulHallett1305</dc:creator>
      <dc:date>2021-03-17T16:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a SDEF from Geopandas using GeoAccessor gives wrong crs</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037672#M5741</link>
      <description>&lt;P&gt;Can you call &lt;STRONG&gt;gdf.crs&lt;/STRONG&gt; to verify that it's got the right CRS going into the conversion to SEDF?&lt;/P&gt;&lt;P&gt;Also, I don't know what your input data looks like, but could you use &lt;STRONG&gt;gpd.GeoDataFrame.from_file() &lt;/STRONG&gt;and skip pandas altogether? I use that method frequently to create a geodataframe directly from WKT or JSON.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 16:42:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037672#M5741</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-17T16:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a SDEF from Geopandas using GeoAccessor gives wrong crs</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037697#M5742</link>
      <description>&lt;P&gt;Yeah, I checked all that.&lt;BR /&gt;&lt;BR /&gt;Putting gdf.crs() gets epsg:27700 returned, but print out sdf gets this&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;_prepare_from_string(" ".join(pjargs)) datecreated ... SHAPE 0 2008/07/10 00:00:00 ... {"rings": [[[-0.07844650101657248, 51.46935646... 1 2008/07/10 00:00:00 ... {"rings": [[[-1.7625062007924153, 52.107322561... 2 2008/07/10 00:00:00 ... {"rings": [[[-0.1856100811699591, 51.462464098...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So it's actually converted it to 4326?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 17:07:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037697#M5742</guid>
      <dc:creator>PaulHallett1305</dc:creator>
      <dc:date>2021-03-17T17:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a SDEF from Geopandas using GeoAccessor gives wrong crs</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037698#M5743</link>
      <description>&lt;P&gt;So, doing this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;            df['geometry'] = df['geometry'].apply(wkt.loads)
            gdf = gpd.GeoDataFrame(df, geometry='geometry', crs="epsg:27700")
            gdf.to_crs(epsg=27700)
            sdf = GeoAccessor.from_geodataframe(gdf, True, column_name='SHAPE')
            print(sdf)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Gets this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/databricks/python/lib/python3.7/site-packages/pyproj/crs/crs.py:53: FutureWarning: '+init=&amp;lt;authority&amp;gt;:&amp;lt;code&amp;gt;' syntax is deprecated. '&amp;lt;authority&amp;gt;:&amp;lt;code&amp;gt;' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
  return _prepare_from_string(" ".join(pjargs))
            datecreated  ...                                              SHAPE
0   2008/07/10 00:00:00  ...  {"rings": [[[-0.07844650101657248, 51.46935646...
1   2008/07/10 00:00:00  ...  {"rings": [[[-1.7625062007924153, 52.107322561...
2   2008/07/10 00:00:00  ...  {"rings": [[[-0.1856100811699591, 51.462464098...
3   2008/07/10 00:00:00  ...  {"rings": [[[0.14638727113591657, 51.510927694...
4   2008/07/10 00:00:00  ...  {"rings": [[[-0.8200661066061664, 51.874131670...
5   2008/07/10 00:00:00  ...  {"rings": [[[-0.1856100811699591, 51.462464098...
6   2008/07/10 00:00:00  ...  {"rings": [[[-1.0621569871850989, 51.912285240...
7   2008/07/10 00:00:00  ...  {"rings": [[[-0.9991605542955534, 51.633541404...
8   2008/07/10 00:00:00  ...  {"rings": [[[-0.2443546813382341, 51.567339125...
9   2008/07/10 00:00:00  ...  {"rings": [[[-1.0761921118702544, 51.663047862...
10  2014/11/26 00:00:00  ...  {"rings": [[[-1.3225828436443863, 52.148795254...
11  2008/07/10 00:00:00  ...  {"rings": [[[-0.08436864943664825, 51.63673416...
12  2008/07/10 00:00:00  ...  {"rings": [[[-0.4724007834151011, 51.225515245...
13  2008/07/10 00:00:00  ...  {"rings": [[[-0.0983342716542557, 51.574844517...
14  2008/07/10 00:00:00  ...  {"rings": [[[-0.21069183560205398, 51.60838306...
15  2008/07/10 00:00:00  ...  {"rings": [[[-0.05664283387234121, 51.73474899...
16  2008/07/10 00:00:00  ...  {"rings": [[[-0.05450314310272567, 51.63235428...
17  2008/07/10 00:00:00  ...  {"rings": [[[-0.04208239026530489, 51.80219212...
18  2008/07/10 00:00:00  ...  {"rings": [[[-0.2589295080832842, 51.535863752...
19  2008/07/10 00:00:00  ...  {"rings": [[[-0.10171073752288362, 51.62818936...
20  2008/07/10 00:00:00  ...  {"rings": [[[-0.6395494140946187, 51.581788971...

[21 rows x 5 columns]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Checking the PD dataframe, it holds this, as does the geopandas dataframe.&lt;BR /&gt;&lt;BR /&gt;Very confusing.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MULTIPOLYGON (((533564.6773 176238.329500001,533635.9451 176222.1053,533663.1448 176217.004699999,533730.5444 176208.103800001,533730.897 176208.080499999,533767.3441 176205.8026,533789.344 176205.202,533789.7 176205.229,533790.3 176180.7,533779.8088 176175.2092,533767.5896 176169.7785,533754.0126 176162.99,533738.914 176154.424,533729.5742 176147.6028,533717.8075 176139.9092,533706.9459 176132.668199999,533697.4421 176124.522,533684.3177 176115.018200001,533672.0985 176105.061799999,533662.1421 176094.200200001,533655.0498 176087.2009,533643.2104 176073.761600001,533656.3298 176074.7216,533657.2897 176066.562,533632.1 176026.889799999,533627.6 176019.389799999,533618.75 176004.139799999,533615.95 175998.739800001,533614.8132 175998.521500001,533607.8479 175995.591,533607.1 175993.289799999,533593.6 175965.889799999,533577.0 175916.989800001,533572.2 175882.5898,533573.8 175802.3398,533573.5987 175800.4278,533574.2442&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;geopandas for reference&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;0   2008/07/10 00:00:00  ...  MULTIPOLYGON (((416362.400 245470.200, 416363....
1   2008/07/10 00:00:00  ...  MULTIPOLYGON (((506767.500 148477.600, 506774....
2   2008/07/10 00:00:00  ...  MULTIPOLYGON (((526140.826 175282.013, 526141....
3   2008/07/10 00:00:00  ...  MULTIPOLYGON (((526140.826 175282.013, 526143....
4   2008/07/10 00:00:00  ...  MULTIPOLYGON (((533564.677 176238.330, 533635....
5   2008/07/10 00:00:00  ...  MULTIPOLYGON (((532665.876 194840.550, 532725....
6   2008/07/10 00:00:00  ...  MULTIPOLYGON (((481327.900 220164.500, 481605....
7   2008/07/10 00:00:00  ...  MULTIPOLYGON (((520853.600 183320.800, 520873....
8   2008/07/10 00:00:00  ...  MULTIPOLYGON (((549044.177 181294.765, 549174....&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 17:35:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037698#M5743</guid>
      <dc:creator>PaulHallett1305</dc:creator>
      <dc:date>2021-03-17T17:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a SDEF from Geopandas using GeoAccessor gives wrong crs</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037703#M5744</link>
      <description>&lt;P&gt;Strange. Not sure I have any guesses why it's forcing the conversion.&lt;/P&gt;&lt;P&gt;Is it possible to call &lt;STRONG&gt;sdf.project(sr)&lt;/STRONG&gt; to get it back to the right CRS after the fact?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 17:18:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037703#M5744</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-17T17:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a SDEF from Geopandas using GeoAccessor gives wrong crs</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037726#M5746</link>
      <description>&lt;P&gt;I couldn't see it on the object model, but I shall try!&amp;nbsp; So I create an ESRI sr and then pass it in.&lt;BR /&gt;&lt;BR /&gt;We'll see!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 17:52:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037726#M5746</guid>
      <dc:creator>PaulHallett1305</dc:creator>
      <dc:date>2021-03-17T17:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a SDEF from Geopandas using GeoAccessor gives wrong crs</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037761#M5747</link>
      <description>&lt;P&gt;I'm actually developing a script right now that uses the gdf → sedf process, and I'm not running into any issues. I have in the past run into serious issues on python envs where GeoPandas and ArcGIS modules are both installed, sometimes requiring me to make a new env from scratch.&lt;/P&gt;&lt;P&gt;Can you try your same code, but leave the &lt;STRONG&gt;inplace&lt;/STRONG&gt; parameter set to the default value of &lt;EM&gt;False&lt;/EM&gt;? As you are assigning the output to a new variable, it doesn't make sense for that to be &lt;EM&gt;True&lt;/EM&gt;, as that would convert the gdf object to a SEDF.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 19:13:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037761#M5747</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-17T19:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a SDEF from Geopandas using GeoAccessor gives wrong crs</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037775#M5748</link>
      <description>&lt;P&gt;Hi Josh,&lt;BR /&gt;&lt;BR /&gt;Thanks for looking at this.&lt;BR /&gt;&lt;BR /&gt;I am creating a SEDF from a Ggeopandas dataframe via the GeoAccessor object so it will be new?&lt;BR /&gt;&lt;BR /&gt;I thought it was false (esssentially I have tried both ways to no avail) - Here's the offending code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;df['geometry'] = df['geometry'].apply(wkt.loads)
gdf = gpd.GeoDataFrame(df, geometry='geometry', crs="epsg:27700")
sdf = GeoAccessor.from_geodataframe(gdf, False, column_name='SHAPE')
# result = project(geometries=df['geometry'], in_sr=4326, out_sr=27700)
df_spatial_fc = sdf.spatial.to_featurelayer(
                title=self.layer_name,
                gis=self.gis,
                tags=tags)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 10:17:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/creating-a-sdef-from-geopandas-using-geoaccessor/m-p/1037775#M5748</guid>
      <dc:creator>PaulHallett1305</dc:creator>
      <dc:date>2021-03-18T10:17:47Z</dc:date>
    </item>
  </channel>
</rss>

