I need to project geometries in an spatial dataframe and try to do it with this code
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)
A check on the geometry column in the SeDF returns
![TomGeo_0-1669543556653.png TomGeo_0-1669543556653.png](https://community.esri.com/t5/image/serverpage/image-id/56890i188053DCE625C925/image-size/medium?v=v2&px=400)
I am logged into our Enterprise portal when running the code, and I am getting:
Exception: Invalid Token
(Error Code: 498)
I am running ArcGIS Pro 3.0.2, our portal is in version 10.9 and arcgis is in version 2.0.1
PS: I am getting the same error when trying to find the transformation needed to do the projection
arcgis.geometry.find_transformation(in_sr=4326, our_sr=3006)
- We are living in the 21st century.
GIS moved on and nobody needs a format consisting out of at least three files! No, nobody needs shapefiles, not even for the sake of an exchange format. Folks, use GeoPackage to exchange data with other GIS!