Select to view content in your preferred language

How to transfer GeoPandas dataframe to ArcGIS Pro?

733
2
10-23-2024 07:32 AM
Labels (1)
stepavac
Emerging Contributor

I am trying to save a geodataframe prepared in GeoPandas into ArcGIS via GeoPackage file.

The source data have coordinates in WGS-84 3D, e.g. EPSG:4979.

 

geometry = gpd.points_from_xy(dfs['Longitude'], dfs['Latitude'], dfs['Altitude'], 'EPSG:4979')
gdf = gpd.GeoDataFrame(dfs, geometry=geometry)

gdf.to_file("overview.gpkg", layer='assays', driver="GPKG")

 

ArcGIS Pro sees the file, but raises "Unknown CRS" error.

At the same time, ArcGIS does know that CRS (I can use Define projection tool to assign it).

Any idea how to make it work?

0 Kudos
2 Replies
jcarlson
MVP Esteemed Contributor

An optional parameter on that method is crs, which defaults to None.

Try specifying crs='EPSG:4326' and see if it changes.

- Josh Carlson
Kendall County GIS
0 Kudos
stepavac
Emerging Contributor

Dear Josh,

Thanks for reply. Yes, that partly works - it's OK for Maps, for Scene it results in a complaint about missing vertical CRS.

Vaclav

0 Kudos