ArcGis Rest API - 如何从 MapServer 获取栅格图层?

ArcGis Rest API - How to get raster layer from MapServer?

我正在尝试通过 ArcGIS REST 从澳大利亚政府获取栅格图层(5 米数字高程模型 (DEM))API

url: https://services.ga.gov.au/site_9/rest/services/DEM_LiDAR_5m/MapServer/

我可以对边界层和足迹层执行查询并获得良好结果

边界查询:

"https://services.ga.gov.au/site_9/rest/services/DEM_LiDAR_5m/MapServer/1/query?where=&text=&objectIds=&time=&geometry=xmin:133.226100657682, ymin:-23.6165145646468, xmax:133.235899342318, ymax :-23.6074854353532&geometryType=esriGeometryEnvelope&inSR=4283&spatialRel=esriSpatialRelEnvelopeIntersects&relationParam=&outFields=&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&f=json"

响应(在 R 中绘制):

R plot through jsonlite response

足迹查询:

"https://services.ga.gov.au/site_9/rest/services/DEM_LiDAR_5m/MapServer/2/query?where=&text=&objectIds=&time=&geometry=xmin:133.226100657682, ymin:-23.6165145646468, xmax:133.235899342318, ymax :-23.6074854353532&geometryType=esriGeometryEnvelope&inSR=4283&spatialRel=esriSpatialRelEnvelopeIntersects&relationParam=&outFields=&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&f=json"

回复:

jsonlite response in R

我从哪里得到了我正在寻找的 TIF 文件的名称,但是我对栅格图层的所有查询:https://services.ga.gov.au/site_9/rest/services/DEM_LiDAR_5m/MapServer/3 没有给我任何结果

我也尝试了 rcran 包“arcpullr”,但没有结果

有什么帮助吗?

library(arcpullr)
library(sf)
library(jsonlite)

loc_lng <- 133.231
loc_lat <- -23.612
study_area <- 1000

bbox_area <- osmar::center_bbox(loc_lng, loc_lat, study_area, study_area)
loc_bbox_pol <- tmaptools::bb_poly(bbox_area)
loc_bbox_pol <- sf::st_as_sf(loc_bbox_pol)
sf::st_crs(loc_bbox_pol) = 4326
loc_bbox_pol <- sf::st_transform(loc_bbox_pol, 4283)

DEM_general <- arcpullr::get_layer_by_poly("https://services.ga.gov.au/site_9/rest/services/DEM_LiDAR_5m/MapServer/0/", loc_bbox_pol, sp_rel = "esriSpatialRelIndexIntersects")
DEM_Boundary <- arcpullr::get_layer_by_poly("https://services.ga.gov.au/site_9/rest/services/DEM_LiDAR_5m/MapServer/1/", loc_bbox_pol, sp_rel = "esriSpatialRelIndexIntersects")
DEM_Info <- arcpullr::get_layer_by_poly("https://services.ga.gov.au/site_9/rest/services/DEM_LiDAR_5m/MapServer/2/", loc_bbox_pol, sp_rel = "esriSpatialRelIndexIntersects")
arcpullr::get_service_type("https://services.ga.gov.au/site_9/rest/services/DEM_LiDAR_5m/MapServer/3/")

很可能数据提供者已禁用该地图服务第 3 层的查询操作。此外,第 3 层上没有启用任何字段,因此没有任何内容可查询或通过查询操作 return。

因此只有导出操作才能通过提供 bbox(您也可以通过使用足迹层的结果来使用)来处理它。

https://services.ga.gov.au/site_9/rest/services/DEM_LiDAR_5m/MapServer/export?bbox=-5611089.372356728%2C-5642303.594604798%2C5611089.372356728%2C-3900762.342155805&bboxSR=%7B%22wkt%22%3A%22PROJCS%5B%5C%22WGS_1984_Web_Mercator_Auxiliary_Sphere%5C%22%2CGEOGCS%5B%5C%22GCS_WGS_1984%5C%22%2CDATUM%5B%5C%22D_WGS_1984%5C%22%2CSPHEROID%5B%5C%22WGS_1984%5C%22%2C6378137.0%2C298.257223563%5D%5D%2CPRIMEM%5B%5C%22Greenwich%5C%22%2C0.0%5D%2CUNIT%5B%5C%22Degree%5C%22%2C0.0174532925199433%5D%5D%2CPROJECTION%5B%5C%22Mercator_Auxiliary_Sphere%5C%22%5D%2CPARAMETER%5B%5C%22False_Easting%5C%22%2C0.0%5D%2CPARAMETER%5B%5C%22False_Northing%5C%22%2C0.0%5D%2CPARAMETER%5B%5C%22Central_Meridian%5C%22%2C149.430392074675%5D%2CPARAMETER%5B%5C%22Standard_Parallel_1%5C%22%2C0.0%5D%2CPARAMETER%5B%5C%22Auxiliary_Sphere_Type%5C%22%2C0.0%5D%2CUNIT%5B%5C%22Meter%5C%22%2C1.0%5D%5D%22%7D&imageSR=%7B%22wkt%22%3A%22PROJCS%5B%5C%22WGS_1984_Web_Mercator_Auxiliary_Sphere%5C%22%2CGEOGCS%5B%5C%22GCS_WGS_1984%5C%22%2CDATUM%5B%5C%22D_WGS_1984%5C%22%2CSPHEROID%5B%5C%22WGS_1984%5C%22%2C6378137.0%2C298.257223563%5D%5D%2CPRIMEM%5B%5C%22Greenwich%5C%22%2C0.0%5D%2CUNIT%5B%5C%22Degree%5C%22%2C0.0174532925199433%5D%5D%2CPROJECTION%5B%5C%22Mercator_Auxiliary_Sphere%5C%22%5D%2CPARAMETER%5B%5C%22False_Easting%5C%22%2C0.0%5D%2CPARAMETER%5B%5C%22False_Northing%5C%22%2C0.0%5D%2CPARAMETER%5B%5C%22Central_Meridian%5C%22%2C149.430392074675%5D%2CPARAMETER%5B%5C%22Standard_Parallel_1%5C%22%2C0.0%5D%2CPARAMETER%5B%5C%22Auxiliary_Sphere_Type%5C%22%2C0.0%5D%2CUNIT%5B%5C%22Meter%5C%22%2C1.0%5D%5D%22%7D&size=3441%2C534&dpi=144&format=png32&transparent=true&layers=show%3A3&f=html