<?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)project geometry after spatial.from_feather() in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/re-project-geometry-after-spatial-from-feather/m-p/1571656#M73429</link>
    <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;after reading a feather file as described &lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.features.toc.html?highlight=from_feather#arcgis.features.GeoAccessor.from_feather" target="_self"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Create SeDf by reading from feather
sdf_f = pd.DataFrame.spatial.from_feather(
    './sedf_data/cities/sample_cms_data.feather')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;we get a pandas DF.&lt;/P&gt;&lt;P&gt;calling&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(sdf_t.spatial.sr)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gives: {'wkid': None}&lt;/P&gt;&lt;P&gt;How could one (re)project the sdf?&lt;/P&gt;</description>
    <pubDate>Mon, 30 Dec 2024 12:17:43 GMT</pubDate>
    <dc:creator>Mer-lin</dc:creator>
    <dc:date>2024-12-30T12:17:43Z</dc:date>
    <item>
      <title>(re)project geometry after spatial.from_feather()</title>
      <link>https://community.esri.com/t5/python-questions/re-project-geometry-after-spatial-from-feather/m-p/1571656#M73429</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;after reading a feather file as described &lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.features.toc.html?highlight=from_feather#arcgis.features.GeoAccessor.from_feather" target="_self"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Create SeDf by reading from feather
sdf_f = pd.DataFrame.spatial.from_feather(
    './sedf_data/cities/sample_cms_data.feather')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;we get a pandas DF.&lt;/P&gt;&lt;P&gt;calling&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(sdf_t.spatial.sr)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gives: {'wkid': None}&lt;/P&gt;&lt;P&gt;How could one (re)project the sdf?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 12:17:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-project-geometry-after-spatial-from-feather/m-p/1571656#M73429</guid>
      <dc:creator>Mer-lin</dc:creator>
      <dc:date>2024-12-30T12:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: (re)project geometry after spatial.from_feather()</title>
      <link>https://community.esri.com/t5/python-questions/re-project-geometry-after-spatial-from-feather/m-p/1578423#M73627</link>
      <description>&lt;P&gt;You can directly set the sr property of the spatial dataframe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis import GeoAccessor
from arcgis.geometry import SpatialReference

# Create dataframe by reading from feather
df = GeoAccessor.from_feather(
    './sedf_data/cities/sample_cms_data.feather')

# Create spatially enabled dataframe (NAD27, EPSG 4267)
sdf_f = GeoAccessor.from_df(df, sr=4267, geometry_column='SHAPE')

# Directly set the spatial reference (WGS84, EPSG 4326) with no conversion
sdf_f.spatial.sr = SpatialReference(4326)

# Verify the spatial reference
print(sdf_f.spatial.sr)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note, this is different projecting the dataframe from one spatial reference system to another.&amp;nbsp; In that case, you would use the .project() method to ensure proper conversion.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.features.toc.html#arcgis.features.GeoAccessor.project" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/latest/api-reference/arcgis.features.toc.html#arcgis.features.GeoAccessor.project&lt;/A&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;LI-CODE lang="python"&gt;# Inplace projection to NAD27
sdf_f.spatial.project(4267)&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>Fri, 24 Jan 2025 14:19:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-project-geometry-after-spatial-from-feather/m-p/1578423#M73627</guid>
      <dc:creator>Marshal</dc:creator>
      <dc:date>2025-01-24T14:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: (re)project geometry after spatial.from_feather()</title>
      <link>https://community.esri.com/t5/python-questions/re-project-geometry-after-spatial-from-feather/m-p/1639916#M74583</link>
      <description>&lt;P&gt;Perfecto. Sry for the late reply!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Aug 2025 08:17:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-project-geometry-after-spatial-from-feather/m-p/1639916#M74583</guid>
      <dc:creator>Mer-lin</dc:creator>
      <dc:date>2025-08-07T08:17:08Z</dc:date>
    </item>
  </channel>
</rss>

