ArcGIS REST API Connector QGIS Plugin: Unterschied zwischen den Versionen

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
K (Query Syntax of ArcGIS REST API)
 
(6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 11: Zeile 11:
 
QGIS-Plugin '''ArcGIS REST API Connector''' which reads from ArcGIS Online and ArcGIS Server and the "Esri Open Data Initiative Portal Software".  
 
QGIS-Plugin '''ArcGIS REST API Connector''' which reads from ArcGIS Online and ArcGIS Server and the "Esri Open Data Initiative Portal Software".  
  
Currently reading "Feature Services" (similar to [[WFS]] but proprietary) and "Map Services" (kind of [[WMTS]]) are supported.
+
This plugin focusses on '''reading''' so-called '''"Maps"''' accessible over the Internet by interpreting JSON (JavaScript Object Notation) similar to [[WFS]].
 +
* Supports HTTP "Basic Authentication" and "NTLM authentication".
 +
* Note that currently only reading "Feature Services" are supported.
 +
* "Map Services" (kind of [[WMTS]]) are NOT supported (see e.g. [http://plugins.qgis.org/plugins/quick_map_services/ QuickMapServices Plugin] for a solution).
  
This plugin focusses on '''reading''' so-called '''"Maps"''' accessible without restrictions over the Internet by interpreting JSON (JavaScript Object Notation) and image output formats.
+
Note that "Map Services" are not supported. Map Services are comparable with [[WMS]] and WMTS. They expose a set of tiled images, read-only, working with the default data frame of the published map document on the server.
  
Functions (similar to WFS) "Add ArcGIS REST Layer...":
+
== Available ArcGIS Services ==
 +
 
 +
* http://sampleserver1.arcgisonline.com/arcgis/rest/services
 +
* http://sampleserver6.arcgisonline.com/arcgis/rest/services
 +
* http://services.arcgisonline.com/arcgis/rest/services
 +
 
 +
== Query syntax and other details of the specification ==
 +
 
 +
From the [http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000w5000000 "ArcGIS REST API" documentation]:
 +
 
 +
The Query operation is performed on a feature service resource. The result is a feature sets for each layer in the query. Other result types (such as count of features and array of feature IDs for each layer in the query) are not supported.
 +
 
 +
There is a limit to the number of features included in the response (see the maxRecordCount property of the feature service).
 +
 
 +
"Feature Service" have functions similar to similar to [[WFS]] but it's a proprietary API. In ArcGIS one can
 
* connect/new/edit/delete connection
 
* connect/new/edit/delete connection
 
* load/save connections
 
* load/save connections
Zeile 21: Zeile 38:
 
* select layer (then download)
 
* select layer (then download)
  
Implementation details of Feature Service:
+
Other implementation details of "Feature Service":
 
* maxRecordCount - currently maxRecordCount is ignored.
 
* maxRecordCount - currently maxRecordCount is ignored.
 
* Query - currently there's no query functionality.
 
* Query - currently there's no query functionality.
 
* outSR - currently geometry is returned as default well-known ID "GCS_WGS_1984".
 
* outSR - currently geometry is returned as default well-known ID "GCS_WGS_1984".
 
Map services expose a set of tiled images, read-only, working with the default data frame of the published map document on the server.
 
 
== Available ArcGIS Services ==
 
 
* http://sampleserver1.arcgisonline.com/arcgis/rest/services
 
* http://sampleserver6.arcgisonline.com/arcgis/rest/services
 
* http://services.arcgisonline.com/arcgis/rest/services
 
 
== Installation and Source Code ==
 
 
Install from inside [[QGIS]] as Python plugin.
 
* Published in QGIS plugin directory: http://plugins.qgis.org/plugins/connector/
 
* Source Code on [https://github.com/geometalab/ArcGISConnector-QGIS-Plugin github]
 
 
Version History:
 
* 0.1.0 - First experimental version for broader testing purposes released 11.4.2014 based on QGIS Version 2.4.
 
* 0.1.1 - Current experimental version on plugins.qgis.org tested on QGIS Version 2.6.
 
  
 
== Support ==
 
== Support ==
Zeile 56: Zeile 55:
 
General improvements may include  
 
General improvements may include  
 
* Authentification (with OAuth 2.0)  
 
* Authentification (with OAuth 2.0)  
* Image Service.
 
 
* HttpProxy ([https://github.com/geometalab/ArcGISConnector-QGIS-Plugin/issues/3 issue #3])
 
* HttpProxy ([https://github.com/geometalab/ArcGISConnector-QGIS-Plugin/issues/3 issue #3])
  
Zeile 73: Zeile 71:
 
* WMTS
 
* WMTS
  
== Feasibility analysis and solution approach Carmelo Schumacher ==
+
== Installation and Source Code ==
Because of the limited functionality python plugins have, only a very basic set of features can be implemented.
 
The best solution is to write an own data provider - but this would require the plugin to be written in C++.
 
  
FeatureServer->FeatureLayer:
+
Install from inside [[QGIS]] as Python plugin (Note: For versions below 1 (0.1 - 0.9) you have to enable "experimental plugins").
(http://resources.arcgis.com/en/help/arcgis-rest-api/#/Query_Feature_Service/02r3000000w5000000/)
+
* Published in QGIS plugin directory: http://plugins.qgis.org/plugins/connector/
Use OGR as the dataprovider for a QgsVectorLayer with datasource URL to FeatureServer with query:
+
* Source Code on [https://github.com/geometalab/ArcGISConnector-QGIS-Plugin github]
/query?where=objectid+%3D+objectid&outfields=*&f=json
 
 
MapServer->FeatureLayer:
 
(http://resources.arcgis.com/en/help/arcgis-rest-api/#/Query_Map_Service_Dynamic_Layer/02r3000000z6000000/)
 
Because MapServer-Queries are restricted by a limit on the number of features included in the feature set response (max 1000), /query?where=objectid+%3D+objectid&outfields=*&f=json will return only 1000 features max. To overcome this restriction, multiple service calls are needed to populate the whole feature-list.  
 
 
 
Possible Solution:
 
* 1 Check if layer has more than 1000 features (using query parameter returnCountOnly=true).
 
* 2a If not, same procedure as featureServer->FeatureLayer -> stop
 
* 2b If yes use OGR Virtual Format (http://www.gdal.org/drv_vrt.html) to join all the service calls needed, to retreive all features (use union layer). Populate the xml first and add to OGR provider. The different queries can be generated by getting all the id's of all the features first (returnIdsOnly=true) and include the id's in the query (max 1000 / query).
 
 
 
MapServer->RasterLayer:
 
* OGR can handle raster queries (http://www.gdal.org/frmt_wms.html search for ArcGIS REST API (GDAL 2.0 and later)):
 
 
 
$ gdallocationinfo -wgs84 "<GDAL_WMS><Service name=\"AGS\"><ServerUrl>http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer</ServerUrl><BBoxOrder>xyXY</BBoxOrder><SRS>3857</SRS></Service><DataWindow><UpperLeftX>-20037508.34</UpperLeftX><UpperLeftY>20037508.34</UpperLeftY><LowerRightX>20037508.34</LowerRightX><LowerRightY>-20037508.34</LowerRightY><SizeX>512</SizeX><SizeY>512</SizeY></DataWindow></GDAL_WMS>" -75.704 39.75
 
 
 
Only bounding box need to be updated on every pan (and zoom?).
 
  
 
[[Kategorie:QGIS-Plugin]] [[Kategorie:QGIS]] [[Kategorie:Python]] [[Kategorie:Software]] [[Kategorie:ArcGIS]]
 
[[Kategorie:QGIS-Plugin]] [[Kategorie:QGIS]] [[Kategorie:Python]] [[Kategorie:Software]] [[Kategorie:ArcGIS]]

Aktuelle Version vom 27. Februar 2016, 18:20 Uhr

Quiz QGIS Plugin Icon.png

QGIS-Plugin ArcGIS REST API Connector (beta) which reads from ArcGIS Online and ArcGIS Server and the "Esri Open Data Initiative Portal Software".

  • A project by Geometa Lab HSR
  • Project Lead: Stefan Keller
  • Authors/Developers: Carmelo Schumacher, Tobias Schmitz, Rafael Krucker and Dennis Ligtenberg


About

QGIS-Plugin ArcGIS REST API Connector which reads from ArcGIS Online and ArcGIS Server and the "Esri Open Data Initiative Portal Software".

This plugin focusses on reading so-called "Maps" accessible over the Internet by interpreting JSON (JavaScript Object Notation) similar to WFS.

  • Supports HTTP "Basic Authentication" and "NTLM authentication".
  • Note that currently only reading "Feature Services" are supported.
  • "Map Services" (kind of WMTS) are NOT supported (see e.g. QuickMapServices Plugin for a solution).

Note that "Map Services" are not supported. Map Services are comparable with WMS and WMTS. They expose a set of tiled images, read-only, working with the default data frame of the published map document on the server.

Available ArcGIS Services

Query syntax and other details of the specification

From the "ArcGIS REST API" documentation:

The Query operation is performed on a feature service resource. The result is a feature sets for each layer in the query. Other result types (such as count of features and array of feature IDs for each layer in the query) are not supported.

There is a limit to the number of features included in the response (see the maxRecordCount property of the feature service).

"Feature Service" have functions similar to similar to WFS but it's a proprietary API. In ArcGIS one can

  • connect/new/edit/delete connection
  • load/save connections
  • filter layer list
  • select layer (then download)

Other implementation details of "Feature Service":

  • maxRecordCount - currently maxRecordCount is ignored.
  • Query - currently there's no query functionality.
  • outSR - currently geometry is returned as default well-known ID "GCS_WGS_1984".

Support

Project notes, issues, bugs and feature requests: See github (for older notes see tab "Diskussion").

Possible Enhancements

According to Esri's specification of "ArcGIS REST API"], there are many services: ... With ready-to-use basemaps, reference layers, and so on, you can quickly add context or a backdrop to your local or worldwide data. Some ArcGIS Online maps are thematic, which may provide all the information you need to present in your application.

Future improvements may be made to Feature Service, Map Service and additionally to a new Image Service, which provides access to raster data similar to Map Services. Both Map and Image services return raster images mosaicked on the fly or WMTS whereas the main difference is that Map Services are read-only while Image Service include an API for editing and uploading (which is out-of-scope of this plugin).

General improvements may include

  • Authentification (with OAuth 2.0)
  • HttpProxy (issue #3)

Future improvements of Feature Service may include:

  • Paging (maxRecordCount) See issue #6
  • Local Feature Cache (see [1])
  • Query and Query Related Records
  • Dealing with compressed http content?
  • Reading/showing "Services Directory"

Future improvements of Map Service may include:

  • Feature (aka OGC WMS GetFeatureInfo?)
  • Image (Marker)?
  • Legend (aka WMS GetLegend)
  • Map Tile
  • WMTS

Installation and Source Code

Install from inside QGIS as Python plugin (Note: For versions below 1 (0.1 - 0.9) you have to enable "experimental plugins").