1

The instructions here: https://hub.qgis.org/wiki/17/Arcgis_rest are straightforward, but I'm getting the same 1000 features regardless of extent (with the 1000 feature outside the viewable map extent in QGIS). My current map extents should only return back a handful of features. Does QGIS pass in the map envelope as Input Geometryto the ArcGIS REST Service? Or am I expected to add it?

I am using the method where you take the http://<host>/arcgis/rest/services/<service>/MapServer/<layer_id> and add query?where=objectid+%3D+objectid&outfields=*&f=json to it. And then adding that via Adding URL as a Vector File in QGIS.

Is this expected behavior? And I need to provide additional query parameters to bring down by return features (like input geometry)?

per Mintx suggestions, I checked WireShark and definitely no additional parameters are being sent (is that by design or that a bug).

QGIS version
2.10.1-Pisa
QGIS code revision
d20c5b7

2 Answers 2

1

The expected behavior of QGIS adding an ArcGIS Rest vector MapServer layer is to request the exact URI at the time the layer is created, with no additional parameters being provided by the QGIS application.

I am basing this answer from the QGIS source code (https://github.com/qgis/QGIS 7f7c1a0) where I searched for esriGeometryPolygon and esriGeometryEnvelope and received no hits (one of these would have to be specified in order to query a layer by geometry).

This is consistent with the behavior observed in QGIS and in the Wireshark traffic (QGIS to ArcGIS Server).

0

By default, ArcGIS Server limits query results to 1000 features. If you have access to the GIS server, you can increase that limit, or you can add a &bbox= parameter to your query to only return results in the specified bounding box.

6
  • That wasn't really my question--my map extent in QGIS should only return 10-15 features. Not 1000 somewhere other than my map extent. I'll clarify in my question (I can see how someone might think I'm asking about AGS behavior)--I'm asking about QGIS behavior. Commented Aug 14, 2015 at 17:42
  • I don't see your map extent in the query to the GIS server. You'll need to add &bbox=lower-left-coord,upper-right-coord so the server knows where you're looking.
    – Mintx
    Commented Aug 14, 2015 at 17:47
  • The QGIS Wiki doesn't state that &bbox is needed. It says to append query?where=objectid+%3D+objectid&outfields=*&f=json, which leads me to believe that QGIS would append the bbox as the map extent changes. Commented Aug 14, 2015 at 17:50
  • The Wiki you linked in your question states at the very bottom: "*Special Note - This will only query the first 1000 or sometimes 500 features."
    – Mintx
    Commented Aug 14, 2015 at 17:53
  • While true, it doesn't answer my question as to the expected behavior of QGIS. If QGIS is providing the bbox, then I should be well under 1000. The 1000 limit (or 500) shouldn't even come into play. Of course that is a big if and is the crux of my question. Commented Aug 14, 2015 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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