Problem: Z and M values are not returned for some features in a feature layer hosted in ArcGIS Online
Querying features in an ArcGIS Online hosted feature layer returns Z or M values only for some features, even though the source data contains Z or M values.
When the source feature geometry is invalid, ArcGIS Online rebuilds the geometry before storing it. Z and M values do not persist when ArcGIS Online rebuilds an invalid geometry.
Solution or Workaround
Correct the feature geometry to meet OGC standards before publishing a hosted feature layer to ArcGIS Online.
If the data source is a shapefile or file geodatabase, complete the following procedure to check source files and correct invalid geometries before publishing.
- In ArcGIS Pro, run the Check Geometry geoprocessing tool with the validation method set to OGC on shapefiles and file geodatabase feature classes before publishing.
- If the Check Geometry geoprocessing tool indicates there are invalid geometries, create a backup copy of the source file.
- In ArcGIS Pro, run the Repair Geometry geoprocessing tool with the validation method set to OGC on any shapefiles or file geodatabase feature classes that contain invalid geometries.