Geographic Information Systems Asked on May 30, 2021
I am trying to convert a JSON
file into a feature. My code was working fine until today and now I am getting the following error – ExecuteError: ERROR 001558: Error parsing json file '<filepath>'. The workspace is not connected.
.
I tried it manually in ArcMap
using this proceedure:
Same results: ERROR 001558. I even tried the default output, which went to the ArcGISDefault.gdb. I also got the same error:
ExecuteError: ERROR 001558: Error parsing json file ”. The
workspace is not connected. Failed to execute (JSONToFeatures).
In researching this issue, I found the ArcGIS Pro page on 001558: Error parsing .json file <value>
which states that the The JSON must have at least the geometryType, spatialReference, fields, and features (with geometry and attributes) property.
I checked the data and it has
geometryType
, spatialReference
, fields
, and features
which have attributes
and geometry
.
{"displayFieldName": "CSLF_ID",
"fieldAliases": {...},
"geometryType": "esriGeometryPolygon",
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
},
"fields": [...],
"features": [
{"attributes": {...},
"geometry": {...}
},...]}
So, I am wondering if there might be something else causing the error. Or can anyone see an issue with the JSON file above?
I know it's a bit late, but I had the same problem.
How the problem raised:
I was downloading my data as GeoJSON for different areas with multiple requests. To import all the data at once in ArcGIS Pro my downloader-script combined all entries under "features". Some features were downloaded by multiple requests so by adding all into one array caused some features to have been added twice.
The solution:
Make sure that all features you have in that array have unique OBJECTIDs (feature→attributes→OBJECTID).
In my case I checked for every feature if one with the same OBJECTID already exists in the final GeoJSON before adding it.
Correct answer by Jony on May 30, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP