I have a Site reference feature service data in polygons served up by ArcGIS Server. I need to get the centroid coordinate of a polygon by the Id but can’t find a method out of the box.
I’m working on a GeoEvent Processor Service that will use this Site service to grab a centroid from a site Id. So far I believe my options are:
- Custom GP service, python – takes in polygon rings, returns point
- Server Object Extension – same as above
- Sql view, query layer served up as a feature service that uses STCentroid (The database uses a SQL GEOGRAPHY type) on the Site layer. Would query the layer by ID to return the geometry.
The first two options keep me on track with a service orientated architecture however it certainly seems overkill to be writing an SOE for one function. The final option could be a ‘goer’ but it means my logic is coupled to SQL Server.