TransWikia.com

Using GeoPandas to generate shapefile from GeoJSON for opening in ArcGIS Pro

Geographic Information Systems Asked by Cyberguille on August 6, 2021

I got from an API a layer of parcels in format GeoJSON, just like the file in this .zip

I need to convert this to a shapefile that could be open for the ArcGIS Pro desktop app

I used Geopandas to generate this shapefile.

import geopandas as gpd

gdf = gpd.read_file("data.json")
gdf.to_file("data.shp", encoding='utf-8')

This generates the shapefile

.
├── data.cpg
├── data.dbf
├── data.prj
├── data.shp
└── data.shx

I check with QGIS and works OK.

But when trying to open with ArcGIS Pro I got this issue
A column was specified that does not exist

I also checking other questions here I change the way to save the field, in order to fix that, but I still got the same issue.

gdf.to_file("data.shp", encoding='utf-8',  crs = {'proj': 'latlong', 'ellps': 'WGS84', 'datum': 'WGS84', 'no_defs': True},  driver="ESRI Shapefile")

Here the shape generated by my code:

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP