Geographic Information Systems Asked by Jai on December 24, 2020
TLDR; is there any way to display an image on a ArcGIS Runtime SceneView
just like ImageOverlay
, but without the use of ImageOverlay
? (Long story in quotes)
I have an ArcGIS Runtime application written in WPF, which I need to
display a heatmap image. The image is calculated/generated on the fly,
and it’s in the form of raw byte array (i.e. not as a file). As the
user interact with the application, the heatmap is recalculated (i.e.
a new heatmap is generated to replace the old heatmap). The
application operates in both 2D and 3D (user can switch between the
two), which means the application must be able to show the heatmap in
bothMapView
andSceneView
.ArcGIS Runtime 100.8 comes with a new useful
ImageOverlay
feature
(though I’m using 100.9). I could get it to work in aSceneView
.
The implement for theMapView
is different, sinceImageOverlay
is
supported only forSceneView
. It is implemented using the
GraphicOverlay
, with anEnvelope
geometry andPictureFillSymbol
symbol. As thePictureFillSymbol
was designed to work with any
geometry with "fill" (includingPolygon
), the image ended up
repeating in tile inside the geometry. I had to change the
PictureFillSymbol.ScaleX
andPictureFillSymbol.ScaleY
properties
whenever the mapview’s viewport (or scale) changes.Subsequently, I realized that the application is crashing randomly
when I was navigating in aMapView
. I made a new WPF project with a
basicMapView
to duplicate the issue – it occurs randomly during map
zooming, withSystem.AccessViolationException:'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
at
RuntimeCoreNet.GeneratedWrappers.CoreGeoView.CoreRT_GeoView_pulse(IntPtr thisHandle, IntPtr& outErrorHandle)
. I downgraded my SDK from 100.9
to 100.8 to see if there is similar problem. It generated errors in
100.8, but more types of exceptions are seen. As my previous SDK was at 100.6, I decided to test that, and it seems like the issue did not
happen at 100.6.I had to roll back to 100.6, but
ImageOverlay
was introduced in
100.8. The method I used forMapView
does not work inSceneView
, because
it involves convertingMapPoint
of theEnvelope
‘s corners to screenPoint
s
to calculate the rendered pixel size based on the geometry size on screen.
This will not work in aSceneView
.I’m trying to see if
Raster
andRasterLayer
would work,
but my image is inbyte[]
form, with no georeferencing.Is there other ways that I can implement my own
ImageOverlay
?
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP