QGIS ArcGIS REST/SERVICES Map Support Seems Kind of Broken
QGIS ArcGIS REST/SERVICES Map Support Seems Kind of Broken πΊοΈ
Spent too long this evening trying to figure out how to run ArcGIS REST where queries in QGIS. It seems like despite the pretty new ArcGIS Rest dialogue in the software it’s kind of broken – the bounding box query doesn’t update when you pan the window, and there is no way as far as I can figure out to query with a where statement on attributes, such as YR_Built < 1820.
The thing about it is neither feature would be super difficult to fix. While I don’t have a lot of formal programming experience, I have written some QGIS plugins before. The ArcGIS REST protocol is just an Ordinary HTTP GET or Post request, you simply request the query something like this:
https://gis.dot.ny.gov/hostingny/rest/services/Roadways/Traffic_Monitoring/MapServer/1/query?where=’County=Albany’& f=json
Not rock science. The server does all the work. The data is just Geo JSON returned which QGIS has had support for years. The bounding box is set by bbox=42.5,-76,43,-76.5 etc. – QGIS should resend the query automatically whenever you move the window and not by default request either everything or a fixed bounding box.
Could I download the source code and patch myself? Probably. Although I’d worry about messing up or breaking something else and I bet QGIS requires a ton of header files that I lack to compile. A better solution might be to write a python plugin but I feel like for a lot of things that would be reinventing the wheel and be cumbersome.
The alternative is at least for small queries without the bounding box is to just download geojson data I need directly from the server using wget then loading the downloaded file directly into QGIS. But I still wish I could use the built in QGIS ArcGIS REST Browser.