You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' Get Samples from Image Service#' get_samples<-function(
x,
geometry,
interpolation= c("bilinear", "cubic", "majority", "nearestneighbor")
fields=NULL,
sample_distance=NULL,
sample_count=NULL,
mosaic_rule=NULL,
slice_id=NULL
) {
# verify it is an image server
check_inherits_any(x, "ImageServer")
# mosaic rules: # https://developers.arcgis.com/rest/services-reference/enterprise/mosaic-rules.htm# interpolation values# RSP_BilinearInterpolation | RSP_CubicConvolution | RSP_Majority | RSP_NearestNeighbor# TODO handle fields# prepare geometry for adding to the request. # we will use prepare_spatial_filter() # but the predicate is irrelevant here we will extract # only the geometryType and the geometrygeom_prepped<- prepare_spatial_filter(geometry, predicate="intersects")
b_req<-httr2::req_url_path_append(
httr2::request(x[["url"]]),
"getSamples"
)
resp<-httr2::req_body_form(
b_req,
geometryType=geom_prepped[["geometryType"]],
geometry=geom_prepped[["geometry"]],
outFields="*",
f="json"
)
}
The text was updated successfully, but these errors were encountered:
Documentation: https://developers.arcgis.com/rest/services-reference/enterprise/get-samples.htm
Work against landsat: https://landsat2.arcgis.com/arcgis/rest/services/Landsat/MS/ImageServer/getSamples
The text was updated successfully, but these errors were encountered: