Select to view content in your preferred language

ArcGIS REST API returnCentroid parameter

1954
2
11-24-2016 12:30 AM
AshishArora4
New Contributor


http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Feature_Service_Layer/02r30000...

Query (Feature Service/Layer)

Request parameter: returnCentroid

  • The layer metadata returns supportReturningGeometryCentroid in the advancedQueryCapabilities metadata object.
    Metadata does not return supportReturningGeometryCentroid.

  • The absence of the supportReturningGeometryCentroid property means that the server does not support the returnCentriod parameter.
    I am using ArcGIS for Server 10.4.1 (build 5686) Advanced. Please let me know which server version supports returnCentroid parameter for polygon data as metadata does not return supportReturningGeometryCentroid.
Tags (1)
0 Kudos
2 Replies
DanMcCoy
Frequent Contributor

That's a good question.  From the "What's New", it looks like it didn't appear until 10.6

What's new in the ArcGIS REST API—ArcGIS REST API: Services Directory | ArcGIS for Developers 

... but since the OP was from 2016, I seems like it would have been earlier like 10.5.x....?

Dan

JamesCrandall
MVP Frequent Contributor

We too are still on ArcGIS Server 10.4 and had to come up with a solution.  Perhaps not the most performance-optimized, we opted to create a publish a Geoprocessing service to return the centroid coordinate information for other map services.  Basically, the GP service is a proxy or a wrapper for the desired polygon map service which we'd like centroid coordinates and some very simple python delivers that info.

0 Kudos