2

This REST URI returns 299 identical records:

http://dec.alaska.gov/arcgis/rest/services/EH/Solid_Waste_Sites/MapServer/1/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryPolygon&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&resultOffset=&resultRecordCount=&f=kmz

However if you have it return JSON or HTML, you get the distinct records:

http://dec.alaska.gov/arcgis/rest/services/EH/Solid_Waste_Sites/MapServer/1/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryPolygon&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&resultOffset=&resultRecordCount=&f=html

This was also happening with layer 0 and I somehow got it to stop by recreating the URI from the query form. I am now using the identical URI with just a different layer id and geometry type - layer 0 is point and layer 1 is polygon. I have also tried recreating the URI from the query form.

It appears that the server is using ArcGIS 10.31.

The server is back up but problem is still there. I should clarify that each record has a unique geometry, but the data fields (ObjectID, Site_ID, Comments, Site Name) are the same on every record in the KMZ. When getting the HTML or JSON the data fields are correct.

Update: I just found a second server, this one at the EPA, that is doing the same thing. The geometries are unique but the data, OBJECTID and PGM_SYS_ID is the same for every record. Here is the URI to get the KMZ:

https://geodata.epa.gov/arcgis/rest/services/OEI/FRS_INTERESTS/MapServer/27/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=PGM_SYS_ID&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&returnTrueCurves=false&resultOffset=&resultRecordCount=&f=kmz

The EPA server also says it is v10.31.

  • Ah! I am getting distinct value for output formats(kmz,json,html,AMF) rather then setting the parameteter returnDistinctValues=true – SIslam Jul 23 '16 at 5:20
  • So no one else had a problem with it, it was working for them? I checked back to the server today and it appears to be down entirely, maybe that was the problem? If either of those was the case, saying so would have been much more helpful than putting it on hold with a canned response which does not tell me anything useful. – Brad Mathews Jul 27 '16 at 21:51
  • @Slslam, Yeah, I tried that too, maybe the problem was fixed on the server end by the trme you got to it? Of course now the server is down entirely so I cannot find out! – Brad Mathews Jul 27 '16 at 21:53
  • There is an edit button beneath your question that you can use to revise it with more details at any time. As long as you edit within about a week the act of you editing will move it into the review queue for re-opening. – PolyGeo Jul 28 '16 at 19:42
  • 4
    Every edit bumps it. Unlike a discussion forum and other Q&A sites there is no purgatory here. To keep a question alive you just need to keep improving it. Most importantly, remember that we are not a support site and all potential answerers are volunteering their time so you need to try and make what you are doing, what you have tried and where you are currently stuck as clear as possible in order to attract their attention to your rather than another question. – PolyGeo Jul 28 '16 at 20:57
2

This is a bug in ArcGIS Server. It was fixed for ArcGIS 10.4.

From http://downloads.esri.com/support/downloads/other_/104-IssuesAddressedList.pdf :

BUG-000088575 Running a query from REST with the output format set to KMZ generates an output which duplicates the parameter, resulting in duplicate attributes.

You would have to contact Esri Support (or your local reseller) to determine if there's a fix for 10.3.1, or if upgrading is the only way to resolve the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.