Trying to get X,Y and Z from hosted feature layer in portal using the following ArcGIS Api for python. The return is only for X and Y and no Z.
Any idea if there is another way thanks.
portal = "link to portal"
u = "user"
p = "password"
gis = GIS(portal,u,p)
# Specify the URL of your feature layer
feature_layer_url = "link to layer"
feature_layer = FeatureLayer(feature_layer_url)
features = feature_layer.query(where="objectid= 1", out_fields="*").features
# Extract coordinates
for feature in features:
geometry = feature.geometry
print(geometry ) the return is
Geometry: {'x': 477361.3940345794, 'y': 1100421.3303648233, 'spatialReference': {'latestWkid': 2882, 'wkid': 2882}}I want to note that the feature has Z.