<?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 Project geometries in an spatial dataframe fails with code 498 in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/project-geometries-in-an-spatial-dataframe-fails/m-p/1235196#M8059</link>
    <description>&lt;P&gt;I need to project geometries in an spatial dataframe and try to do it with this code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import pandas as pd
from arcgis import geometry
from arcgis.features import GeoAccessor, GeoSeriesAccessor

in_csv = r'C:\Path\to\points.csv'
point_df = pd.read_csv(in_csv, sep=';')
point_df = pd.DataFrame.spatial.from_xy(point_df, x_column='Longitude', y_column='Latitude', sr=4326)
point_df['SHAPE'] = geometry.project(geometries=point_df['SHAPE'], in_sr=4326, out_sr=3006)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A check on the geometry column in the SeDF returns&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TomGeo_0-1669543556653.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56890i188053DCE625C925/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TomGeo_0-1669543556653.png" alt="TomGeo_0-1669543556653.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am logged into our Enterprise portal when running the code, and I am getting:&lt;/P&gt;&lt;P&gt;Exception: Invalid Token&lt;BR /&gt;(Error Code: 498)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running ArcGIS Pro 3.0.2, our portal is in version 10.9 and arcgis is in version 2.0.1&lt;/P&gt;&lt;P&gt;PS: I am getting the same error when trying to find the transformation needed to do the projection&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcgis.geometry.find_transformation(in_sr=4326, our_sr=3006)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 27 Nov 2022 10:29:41 GMT</pubDate>
    <dc:creator>TomGeo</dc:creator>
    <dc:date>2022-11-27T10:29:41Z</dc:date>
    <item>
      <title>Project geometries in an spatial dataframe fails with code 498</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/project-geometries-in-an-spatial-dataframe-fails/m-p/1235196#M8059</link>
      <description>&lt;P&gt;I need to project geometries in an spatial dataframe and try to do it with this code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import pandas as pd
from arcgis import geometry
from arcgis.features import GeoAccessor, GeoSeriesAccessor

in_csv = r'C:\Path\to\points.csv'
point_df = pd.read_csv(in_csv, sep=';')
point_df = pd.DataFrame.spatial.from_xy(point_df, x_column='Longitude', y_column='Latitude', sr=4326)
point_df['SHAPE'] = geometry.project(geometries=point_df['SHAPE'], in_sr=4326, out_sr=3006)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A check on the geometry column in the SeDF returns&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TomGeo_0-1669543556653.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56890i188053DCE625C925/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TomGeo_0-1669543556653.png" alt="TomGeo_0-1669543556653.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am logged into our Enterprise portal when running the code, and I am getting:&lt;/P&gt;&lt;P&gt;Exception: Invalid Token&lt;BR /&gt;(Error Code: 498)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running ArcGIS Pro 3.0.2, our portal is in version 10.9 and arcgis is in version 2.0.1&lt;/P&gt;&lt;P&gt;PS: I am getting the same error when trying to find the transformation needed to do the projection&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcgis.geometry.find_transformation(in_sr=4326, our_sr=3006)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2022 10:29:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/project-geometries-in-an-spatial-dataframe-fails/m-p/1235196#M8059</guid>
      <dc:creator>TomGeo</dc:creator>
      <dc:date>2022-11-27T10:29:41Z</dc:date>
    </item>
  </channel>
</rss>

