Select to view content in your preferred language

NoData value on ArcGISImageServiceLayer?

1894
1
02-24-2010 05:34 AM
AxelSchaefer
Emerging Contributor
Hi.

How is the NoData attribute on ArcGISImageServiceLayer defined? Which value should I put into that field?

If I want to define the color Black as the noData value, I guess my line should be like this:

<esri:ArcGISImageServiceLayer ID="Geoeye" Url="http://server/ArcGIS/rest/services/MyService/ImageServer" NoData="0"/>


First question: How is that double value (according to the API) calculated? What would be the value for WHITE?

Second question: No matter, what I put as a value into the NoData attribute, I get the following error message:

Unhandled Error in Silverlight Application AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 40 Position: 150]   bei System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   bei ESRIStandardMapApplication1.MainPage.InitializeComponent()
   bei ESRIStandardMapApplication1.MainPage..ctor()
   bei ESRIStandardMapApplication1.App.Application_Startup(Object sender, StartupEventArgs e)
   bei System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   bei MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
Zeile: 1
Zeichen: 1
Code: 0
URI: http://localhost:49767/Silverlight.js


If I remove the NoData attribute, the application runs fine, but the Image Service overlaps my other mapservices with a white background color.

Can anyone help me out with this two questions?

Thanks in advance and best regards,
Axel

System:
- ArcGIS Desktop, Server 9.4 beta2
- ESRI Silverlight API 2 (current beta).
- Expression Blend 3 (with all SP and updates)

- Image Services coming from ArcGIS ImageServer 9.3.1 hostet on a Windows 2003 machine with an ArcGIS Server Server 9.3.1 on a Windows XP machine. This combination runs well.
0 Kudos
1 Reply
RexHansen
Esri Contributor
You'll need to explicitly define the NoData type:

  <esri:ArcGISImageServiceLayer.NoData>                       
    <sys:Double>0</sys:Double>
  </esri:ArcGISImageServiceLayer.NoData>

This should be fixed in our next release (2.0 public beta, available early April).  At that point you should be able to define the NoData value as a string and it will be converted to the appropriate type for you.

There is another problem though.  Rendering transparent portions of images in Silverlight 3 is limited.   This means your NoData sections will likely not be rendered transparent in the map, even though you have correctly set the NoData value.   Support for image transparency has improved significantly in Silverlight 4.  I have tested SL4 beta and image generated by image services are correctly rendered with the appropriate transparency settings.  This means you have to wait for SL4... which should be released to the public next week. 

-Rex
0 Kudos