Select to view content in your preferred language

10.1 SP1 returnDistinctValues not working with geometry parameter

3810
2
08-09-2013 07:20 AM
JiriKozel
New Contributor
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?
0 Kudos
2 Replies
JohnGravois
Deactivated User
sorry for the extremely late reply, but i just came across this forum thread and can't reproduce the behavior you describe in 10.21

http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/2/query?where=STATE_NAME...

hopefully that means the problem has been solved.
0 Kudos
AndrewBrown1
Deactivated User

Can you confirm this is a bug at 10.1 QIP SP1?

We cannot upgrade to 10.2 at this point due to security issues. I wish it were that easy.

0 Kudos