Select parts of an KmlGroundOverlay

760
4
11-04-2021 01:52 AM
FlorianKowalsky
New Contributor III

I have added an Image to an KmlGroundOverlay.

Most parts of this Image are tranparent.

Is there an way to select  this Image with the Mouse, like I can do it with graphics on a GraphicsOverlay?

 

var polygon = new Polygon(new List<MapPoint> { p1,p2,p3,p4 });

var overlay = new KmlGroundOverlay(polygon, new KmlIcon(new Uri(tempPath)));
var dataset = new KmlDataset(overlay);
var layer = new KmlLayer(dataset) {Id = graphicDefinitionId.ToString()};

Map.OperationalLayers.Add(layer);
Tags (2)
0 Kudos
4 Replies
MichaelBranscomb
Esri Frequent Contributor

Would you like to select the image outline/extent, or individual areas within the image? 

0 Kudos
FlorianKowalsky
New Contributor III

I would like to select individual areas within the image.

It would be nice if i could give the areas a "glow" effect, like selecting geometries on a GraphicsOverlay

The image outline is given by my polygon, thats no problem.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

Unfortunately the API does not currently support directly identifying/selecting discrete contiguous sets of cells within an image/raster. That type of functionality is potentially available in ArcGIS Pro as the Raster to Polygon geoprocessing tool, and if you're using WPF then you could investigate using the ArcGIS Runtime Local Server component to run a geoprocessing package that contains a model/script that uses the Raster to Polygon tool.

For more info see:

https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/create-a-model-tool.htm 

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/package-result.htm

https://developers.arcgis.com/net/local-server/

 

0 Kudos
FlorianKowalsky
New Contributor III

Thanks for the answer, but i have found a workaraound with a simple hit testing on the displayed Image.

 

But i can can a lokk at the local Server, when having a little bit time.

0 Kudos