UGA-ITOSHumanitarianGIS / mapservicedoc

Map Service Documentation and Tools Hosted by University of Georgia for Common Operational Datasets (COD) coordinated by UN OCHA and accessible through HDX, https://data.humdata.org and humanitarian data
https://codgis.itos.uga.edu/arcgis/rest/services
GNU General Public License v3.0
2 stars 0 forks source link

ArcGIS layer index #47

Open maxmalynowsky opened 3 months ago

maxmalynowsky commented 3 months ago

When the HDX URL's all became standardized like https://data.humdata.org/dataset/cod-ab-tcd, I was able to do things like iterate through all ISO3 codes and get metadata from HDX associated to every dataset from the API using "https://data.humdata.org/api/3/action/package_show?id=cod-ab-tcd". For the ArcGIS server, it would be useful if the index position of each layer corresponded to their admin level to be able to build out URL's like the following:

https://codgis.itos.uga.edu/arcgis/rest/services/COD_External/{iso_3}_pcode/FeatureServer/{adm_lvl}/query?where=1=1&outFields=*&f=json

The following layers prevent the above assumptions of layer indexes from holding all the time:

Follows assumption of admin level = layer index

Screenshot 2024-04-11 at 16 33 53

Breaks assumption of admin level = layer index

Screenshot 2024-04-11 at 16 33 32
UGA-ITOSHumanitarianGIS commented 3 months ago

Thanks for suggesting! I believe this will compromise other aspects of the services such as layer drawing order, which may be a legacy issue... will check. But this may be addressed in the COD Services API that denotes the layer index to use for the location and admin level. The output may also denote whether the layer is nested or compeletely in scope with extent as parent layer or next broadest level coverage....

maxmalynowsky commented 3 months ago

I was initially trying to use the COD services API with a location like BWA but this location isn't supported:

Even for supported countries like EGY, some endpoints don't return valid geoJSON:

For that EGY example, the request exceeds the transfer limit, which starts happening at ADM2 and above. Normally, I would be able to get around this when using GDAL by setting FEATURE_SERVER_PAGING=YES. This automatically scrolls through results with a ArcGIS Feature Service endpoint, and was key to be able to pull in all the layers of the ArcGIS server. However, this only works when giving it a URL against the original ArcGIS server, it can't work for URL's that redirect like the one above.