netCDF in a mapfile
Lowe, D (Dominic)
D.Lowe at RL.AC.UK
Fri Jan 28 06:41:40 PST 2005
Hi,
Finally got round to checking this out.
The gdalinfo -mm flag returns nan, nan. However if I do an ncdump on the
file I can see that there are values in there too.
Are NaN values likely to cause any problems?
Dominic
gdalinfo gives:
Driver: GMT/GMT NetCDF Grid Format
Size is 1599, 1139
Coordinate System is `'
Origin = (55.983000,-27.533100)
Pixel Size = (0.00498300,-0.00433300)
Corner Coordinates:
Upper Left ( 55.9830000, -27.5331000)
Lower Left ( 55.9830000, -32.4683870)
Upper Right ( 63.9508170, -27.5331000)
Lower Right ( 63.9508170, -32.4683870)
Center ( 59.9669085, -30.0007435)
Band 1 Block=1599x1 Type=Float32, ColorInterp=Undefined
Computed Min/Max=nan,nan
On Wed, 2005-01-26 at 14:24 +0000, Frank Warmerdam wrote:
> On Wed, 26 Jan 2005 11:10:32 -0000, Lowe, D (Dominic)
> <D.Lowe at rl.ac.uk> wrote:
> > Hi,
> >
> > I'm also interested in displaying netCDF (atmospheric/oceanographic)
> data.
> > So far I've got a GMT generated file 'displayed' but I can only see
> it as a
> > black rectangle. This suggests the GMT driver is working ok.
> However, any
> > type of color expression eg:
> > COLOR
> > # some attempt at color mapping here
> > END
> >
> > just results in a blank image.
> >
> > Has anyone got any idea as to what a correct COLOR mapping would
> look like
> > for a GMT file?
> >
> > Sorry I haven't got the gdalinfo output available now, but I can
> send it
> > tomorrow if it helps.
>
> Dominic,
>
> First, I would encourage you to read over the MapServer 4.4 Raster
> HOWTO. I believe it talks a bit about scaling and classification of
> raster data.
>
> But you also need to ensure that GDAL is "seeing" the proper values
> in your netCDF file. The first way to check is to run gdalinfo with
> the
> -mm flag. This should report the minimum and maximum of the data.
>
> If those values look OK, you should try viewing the file with a GDAL
> based viewer such as OpenEV.
>
> Assuming the values are coming through properly, you may find you
> need to control the scaling explicitly in your mapfile. To do that
> you
> would put something like the following with a minimum and maximum
> appropriate to your data.
>
> PROCESSING "SCALING=0,1000"
>
> Best regards,
> --
>
---------------------------------------+------------------------------------
--
> I set the clouds in motion - turn up | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Programmer for
> Rent
>
--
NERC DataGrid
Rutherford Appleton Lab,
Chilton, Didcot,
Oxon., OX11 0QX, UK
http://ndg.badc.rl.ac.uk/
More information about the MapServer-users
mailing list