Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following code:

feature_geometry = arcpy.AsShape(json_string, esri_json=True)
print feature_geometry
print type(feature_geometry)
>>><geoprocessing record set object object at 0x0E1D9F20>
>>><class 'arcpy.arcobjects.arcobjects.RecordSet'>

It's returning a record set however the documentation says it should return a geometry object... What I am missing?

This is the ESRI_JSON object I'm passing:

share|improve this question
up vote 4 down vote accepted

This is by design, you are sending it a feature set and not a singular geometry.

If you'd like the Geometry on its own, do this:

import json
geom = arcpy.AsShape(json.loads(json_string)["features"][0]["geometry"], True)

We thought in many cases people would like to parse full Esri JSON feature sets and not just individual geometries, so that's why it works the way it does.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.