Image service display errors

2671
2
01-25-2012 12:27 PM
RyanKoehnen
New Contributor III
I posted about this in the silverlight forum, but digging a little deeper revealed issues in the REST request...

I have a single band integer raster with negative values and nodata.

When I export the image directly through the Rest API web interface, two things are apparent, 1) export type of PNG does not honor the value I set for nodata to be transparent and 2) The only type that does work is tiff and when exported to tiff, I get erroneous output for some of the negative value pixels in the output. Sample from Rest export attached. Forum won't let me upload tiff, but png equivalent attached. The white areas in the image are supposed to be negative values in the range of -800 and 0. The entire range of values is about -800 to 6000. Why are some negative values not returned correctly from the rest request?

Any help would be appreciated.

-Ryan
0 Kudos
2 Replies
WenxueJu
Esri Contributor
Ryan,

It looks like you run into a bug in ArcGIS Server 10 REST, which doesn't support applying NoData on 16bit image service (PNG or JPGPNG requests). You may use this workaround in 10:
-- Add source imagery to a mosaic dataset;
-- Use Define Nodata tool to mask out nodata pixels;
-- Publish the mosaic dataset.

For this issue: "some negative values are lost", I'm not sure what exactly happened here, could you make sure nearest neighbor resampling is used and use S16 or unknown as pixelType?

For the question you posted on Silverlight API forum: Negative colormap is not supported through 10 REST but will be supported in 10.1. You may use a workaround in 10.0: add a colormap to your source raster directly (create a DATASETName.clr file which contains your value-rgb mapping) and publish the raster dataset, it will be converted to rgb service automatically.

Wenxue
0 Kudos
RyanKoehnen
New Contributor III
Ryan,

It looks like you run into a bug in ArcGIS Server 10 REST, which doesn't support applying NoData on 16bit image service (PNG or JPGPNG requests). You may use this workaround in 10:
-- Add source imagery to a mosaic dataset;
-- Use Define Nodata tool to mask out nodata pixels;
-- Publish the mosaic dataset.

For this issue: "some negative values are lost", I'm not sure what exactly happened here, could you make sure nearest neighbor resampling is used and use S16 or unknown as pixelType?

For the question you posted on Silverlight API forum: Negative colormap is not supported through 10 REST but will be supported in 10.1. You may use a workaround in 10.0: add a colormap to your source raster directly (create a DATASETName.clr file which contains your value-rgb mapping) and publish the raster dataset, it will be converted to rgb service automatically.

Wenxue


Thanks Wenxue,

Couple of points here- After I more closely inspected the tiff in arcgis, I found that all of the correct values are there. What's interesting is that viewing the tiff in any image previewer and photoshop all misrepresent the same negative values shown in white in my original post. There seems to be some trouble with with rendering and displaying the image properly in just about everything except arcmap. So, no values were lost, there's just some problem with proper rendering of the generated tiff in software other than arcmap. Why this is, I have no idea. Again, it's roughly some range of negative values between ~0 and ~-600. Values less than ~-600 get rendered correctly. All of this carries through to the Silverlight API. The subset of negative values on the generated tiff do not get rendered correctly in the Silverlight API and colormap doesn't work on them. Values less than ~-600 seem to get colormapped fine.

Adding a static colormap directly to the raster would defeat the purpose of the tool. I am building a tool for a client in which they define a classbreak value in a Silverlight dialog. The classbreak determines which parts of the raster are colormapped red or green. The client needs this functionality to analyze maximum build heights over a given area. I'm defining the colormap dynamically based on user input. The only other way to do this would be to create a geoprocessing function or Server object extension to generate a binary raster based on the input class break. We don't have a license for Server spatial analyst and it's outside the budget to go that route anyways.

I have an open support ticket for this issue #1003100. The support personel have my sample data and sample code if you wish to understand in more detail what's going on.
0 Kudos