0
votes

Is there any way to get extent from featureset (contains Feature objects)?

Featureset is obtained by performing query operation on feature service layer in esri rest api.

Esri rest api 10.3 introduced new parameter (returnExtentOnly) to retrieve extent but it is not available in previous versions. Client is in plain java and do not want to introduce any esri client API.

1) Is there any way to get extent using rest services only? (where input = geometries of polygons)

2) Any java util available to calculate extent based on polygon geometries (featureset)?

E.g. in 10.3 http://api.imb.org/arcgis/rest/services/LIVE/Urban/MapServer/0/query?where=GENC1%3D%27US-CA%27&returnExtentOnly=true&f=pjson

1

1 Answers

0
votes

It sounds like you are looking for Statistics from your feature set, Selecting all then returning your coordinate fields with something like:

[
{
    "statisticType": "min",
    "onStatisticField": ,"Your Longitude Field",
    "outStatisticFieldName": "Min_LNG_NR"
  },
{
    "statisticType": "max",
    "onStatisticField": "Your Longitude Field",
    "outStatisticFieldName": "Max_LNG_NR"
  },
{
    "statisticType": "min",
    "onStatisticField": "Your Latitude Field",
    "outStatisticFieldName": "Min_LAT_NR"
  },
{
    "statisticType": "max",
    "onStatisticField": "Your Latiitude Field",
    "outStatisticFieldName": "Max_LAT_NR"
  }
]

in the out put Statistics section.