PROBLEM
In the ArcGIS REST API, the operation 'addFeatures' can be used to add features to a feature layer:
https://<root>/<serviceName>/FeatureServer/<layerId>/addFeatures
As input, the 'features' parameter of this operation requires an array of features in JSON schema.
The problem might arise that line features defined here do not retain their z values after successfully executing. The features are successfully added to the feature service, but the z values are taken over as 0.
The geometry specified in the features parameter must be defined according to the Geometry objects ArcGIS REST API documentation.
As described in this specification, some geometry objects (like Multipoint, Polyline and Polygon) require the boolean parameter "hasZ" to interpret the z values correctly. Omitting this property is the equivalent of setting it to false,
Make sure that the parameter "hasZ": true is included in the geometry definition.
Valid examples can be found in the Geometry objects ArcGIS REST API documentation.
The following is a simple example for a line feature with has enabled z values via the "has Z" parameter:
[ { "attributes": { "Attribute1": 123 }, "geometry": { "hasZ": true, "paths": [ [ [ 1457918.024, 6643976.05, 170.24 ], [ 1458010.65, 6643833.98, 172.6 ], [ 1458005.96, 6643722.02, 175.61 ] ] ] } } ]
Article ID: 000033511
Get help from ArcGIS experts
Download the Esri Support App