Re: GeoTIFF max/min values

Steve Ansari wrote:

Yuan,

Yes.  That is what I got too.

Steve

These two tags should be recognized by Arcmap, and no idea what's wrong here.

Yuan



Yuan Ho wrote:

Steve Ansari wrote:

Yuan,
I've put the files on our FTP site:

http://www1.ncdc.noaa.gov/pub/download/KSGF_NTP_20050105_0004.nc
http://www1.ncdc.noaa.gov/pub/download/KSGF_NTP_20050105_0004.tif

Thanks for looking into this,
Steve



Steve,
         What I got is:
15 IFDEntry == tag = 340 (SMinSampleValue) type = FLOAT count = 1 values = 0.0 16 IFDEntry == tag = 341 (SMaxSampleValue) type = FLOAT count = 1 values = 3.0

Does it look right?

Yuan





Yuan Ho wrote:

Steve Ansari wrote:

Yuan,

I'm not using greyscale. I've printed out the max and min values from the section of GeotiffWriter.java that sets the tag values to verify that the correct max/min values are calculated. It appears that they are.

     MAMath.MinMax dataMinMax = grid.getMinMaxSkipMissingData( data);
     float min = (float) (dataMinMax.min);
     float max = (float) (dataMinMax.max);
System.out.println(min+","+max); geotiff.addTag( new IFDEntry(Tag.SMinSampleValue, FieldType.FLOAT).setValue( min)); geotiff.addTag( new IFDEntry(Tag.SMaxSampleValue, FieldType.FLOAT).setValue( max));





Steve,
Could you send me a copy of this nc file? Or a ftp site if the file is too big.

Yuan


Thanks,
Steve








Yuan Ho wrote:

Steve Ansari wrote:

Hi John,
I did have one other question...

I've been exporting GeoTIFFs from NetCDF files using the ucar.nc2.geotiff.GeotiffWriter class. When I load the images in ESRI ArcMap the default max and min values are incorrect. Ex)
High : 3.40282e+038
Low : 1.17549e-038







Steve,
Is the output file greyscale? Otherwise the min and max value should be stored in these two tags: Tag.SMinSampleValue and Tag.SMaxSampleValue. Let me know how do you get these High and Low values, and what are the values of above two tags.

Yuan


The actual data values are ok and the image is correctly geolocated. It seems that there may be max/min header or tag information that may be missing.

Thanks,
Steve











  • 2005 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: