I'm loading a layer from ArcGIS with the ArcGIS Python API:
from arcgis.features import FeatureLayer layer=FeatureLayer(lyr_url)
Then I make it a pandas dataframe and then move it to Geodataframe as I saw in the documentation:
df=pd.DataFrame.spatial.from_layer(layer) gdf=gpd.GeoDataFrame(df, crs="EPSG:3857")
The problem is I don't get the right geometry that fits my CRS. I tried using set_crs, to_crs and set it when creating gdf and nothing. It's not giving me what I need. I tried Transform as well and it works but only if i know in what crs i'm getting the layer. And it will be different layer each time
Is there a way to set it when you load the layer with 'FeatureLayer'? Or any other way to make it happen?
layerin your code has a different coordinate system to "EPSG:3857"?