Hi
I have a raster published in AGOL and it’s URL is like this https://tiledimageservices1.arcgis.com/IB7Kf2F8K18M2LKr/arcgis/rest/services/fooRaster/ImageServer
I want to access the raster via the Pro SDK but NOT add it to the map, and the only example code I can find is below:
string dataSoureUrl = @”https://tiledimageservices1.arcgis.com/IB7Kf2F8K18M2LKr/arcgis/rest/services/fooRaster/ImageServer”;
ImageServiceLayer rasterLayer = null;
await QueuedTask.Run(() =>
{
// Create a layer based on the url. In this case the layer we are creating is an image service layer.
rasterLayer = (ImageServiceLayer)LayerFactory.Instance.CreateLayer(new Uri(dataSoureUrl), myMap);
});
The reason I don’t want to add it to the map – is because I am doing a “drill down” on about 10 rasters based on an x,y coordinate the user has selected on the map (with some background mapping of the world) – and extract the pixel value at that coordinate. It’s too much unnecessary overhead to load the rasters into Pro and do the analysis after the event.
Is there a way to query a pixel value in memory based on the an x,y location??