English

How To: Edit a z-aware hosted feature layer in ArcGIS Online

Summary

Editing a z-enabled ArcGIS Online hosted feature layer fails with the following error, observed in a web browser's developer tools or Fiddler:

Error: 
'add' parameter is invalid.
The specified geometry is not in the correct format. Geometry does not have z-values
Cannot not perform operation. Invalid operation parameters.
By default, ArcGIS Online disables z-values on publishing a z-enabled layer as a hosted feature service.

ArcGIS Online Web Maps and applications are two-dimensional; they cannot interpolate a z-value unless the new features are snapped to an existing 3D feature or the layer has a non-null default z-value. Otherwise, the default z-value is NULL. Since geometric properties cannot be NULL, no new feature is created.
Note:
Even sharing a Web feature layer from ArcGIS Pro with the 'Elevation' property set for the z-enabled feature layer behaves identically.

Procedure

This behavior can be rectified by following either of the two approaches:

  • Modify "enableZDefaults" to 'true' from the 'Update Definition' operation available at the Admin REST end directory.
  1. From the item details of the hosted feature service, select Service URL.
  2. Add /admin/ between /rest/ and /services/ in the Service URL. See: How to Update Your Hosted Feature Service Schemas in ArcGIS Online
  3. From the Supported Operations, select Update Definition.
  4. Modify enableZDefaults property to true.
  5. If the lastEditDate parameter is populated, replace the string of numbers which indicates the last edit date, and replace it with: "" (double quote marks with no content quoted in them).
  6. Click Update Layer Definition.​
  • If possible, publish the contents by uploading a zipped file geodatabase as an item to ArcGIS Online. This keeps the enableZDefaults property as true on the hosted feature layer. (This can be verified from the Update Definition operation available at Admin REST end directory.)

Related Information