Check the following Python code
from arcgis.features import FeatureLayer
from arcgis.geometry import Geometry
url = 'https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/NYCDemographics1/FeatureServer/0'
layer = FeatureLayer(url)
query = layer.query(
where = '1=1',
out_sr = 4326,
geometry_precision = 6,
result_record_count = 10,
)
geom = Geometry(query.features[0].geometry)
print (geom.centroid)
print (geom.extent)
I am trying to compute the 'label_point' property of a Polygon object in Python API (1.4)
arcgis.geometry module — arcgis 1.4.1 documentation
But I get 'None'. Same goes for 'centroid' or other properties, shall I use another constructor for Geometry?