image service changing statistics

1080
2
06-23-2010 11:26 AM
PaigeBaldassaro
New Contributor
I have an image with statistics for 3 bands. The maximum values for each band are 191, 197, and 179. When I create an image service definition file, the statistics change to maximum 255. This is corrupting the look of the image. Is there any way I can edit/set/force the statistics to be what I want them to be, the original values...

Paige
0 Kudos
2 Replies
PeterBecker
Esri Regular Contributor
This is an issue that affects a number of users. When ArcMap opens a raster that contains stats it by default applied a 2StdDev stretch. This can be turned off in the ArcMap 'Tools,Option,Raster, Display rasters with contrast stretching' option. This though is only for one machine. When you do a build with compute output properties on an ISDef, the stats for the service get created and so by default when the services is added to ArcMap is applies a stretch. There does not exist a specific tool to remove the stats from a service. The simplest method is to open the xxx.ISDef/ImageService.ISDef file with a text editor. Find and delete the node called <Bands> IE the section
<Bands>
<ActualValues>true</ActualValues>
<Alias>Histogram Generation for ImageService</Alias>
......
</Bands>
You can also manually edit the values to specific values if that is requrired/
You will need to recompile the service. No need to build anything.
Do not run the Build with the "Compute output properties" else the stats will be regenerated.
In V10 this is resolved by a Mosaic Dataset having a specific property "Is Preprocessed Data" that when set to Yes results in no stretch being applied when added to ArcMap.
0 Kudos
PaigeBaldassaro
New Contributor
Peter,
Thanks for the input. In the end, I had to go in and manually change the specific values to have the display be the same. Worked just fine.

Paige
0 Kudos