jirikozel

10.1 SP1 returnDistinctValues not working with geometry parameter

Discussion created by jirikozel on Aug 9, 2013
Latest reply on Nov 18, 2014 by abrown31
I've probably found a bug in ArcGIS REST API 10.1 SP1.

If I use the parameter returnDistinctValues=true together with geometry=<envelope>, the server returns all values sorted by alphabet (in my case, values are strings).
Example:
.../arcgis/rest/services/sp/MapServer/1/query?where=1%3D1&outFields=kodPodlazi&returnGeometry=false&returnDistinctValues=true&f=pjson&geometry=-599170.85274263%2C-1160312.4059257%2C-598415.75836763%2C-1159973.8636132&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects
Output:
   ...
  {
   "attributes": {
    "kodPodlazi": "M03"
   }
  },
  {
   "attributes": {
    "kodPodlazi": "N01"
   }
  },
  {
   "attributes": {
    "kodPodlazi": "N01"
   }
  },
  ...


If I use the parameter returnDistinctValues=true without geometry, everything works as expected (only distinct values are returned).
Example:
.../arcgis/rest/services/sp/MapServer/1/query?where=1%3D1&outFields=kodPodlazi&returnGeometry=false&returnDistinctValues=true&f=pjson

Can you please confirm that this is a bug?

Outcomes