NetCDF in Mapserver...

Norman Barker nbarker at RSINC.COM
Wed Nov 16 08:13:17 PST 2005


-----Original Message-----
From: Andrea Marelli [mailto:maro.jam at TISCALI.IT]
Sent: Wednesday, November 16, 2005 3:55 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU; Norman Barker
Subject: Re: NetCDF in Mapserver...


Sorry, but i'm not so expert, and i don't know what wms or wcs are...

My question is, if it's necessary to covert netcdf files to Geotiff format
first, or I can open netcdf files directly..
and also, if i have to use some CONNECTIONTYPE (for example ogr)..
NetCDF is in my gldainfo formats' list, but not in the ogrinfo formats' list...

what i have to do?
thanks.

Andrea

Hi Andrea,

it used to the case that you had to convert to Geotiff, but thanks to work from Denis Nadeau and Frank W this is no longer the case.  Now you can open netCDF directly from MapServer.

You will need to compile WCS support into mapserver, something like
./configure --enable-debug --with-proj=/usr/local --with-ogr=/usr/local/bin/gdal-config --with-wfs --with-wcs --with-wmsclient --with-wfsclient --with-gdal=/usr/local/bin/gdal-config

then your mapfile needs to look something like
    OUTPUTFORMAT
        NAME GEOTIFF_FLOAT
        DRIVER "GDAL/GTiff"
        MIMETYPE "image/tiff"
        IMAGEMODE FLOAT32
        EXTENSION "tif"
    END

    LAYER
        NAME "mynetcdf"
        STATUS OFF
        TYPE RASTER
        DUMP TRUE
        DATA "mydata.nc"
        METADATA
            wcs_label "Test netCDF Server"
            ows_extent '-0.5625 -89.69761276245117 359.4375 89.69761276245117'
            wcs_resolution '1.125 -1.1212201595306397'
            ows_srs "EPSG:4326"
            wcs_formats "GEOTIFF_FLOAT"
            wcs_nativeformat "netCDF"
            wcs_bandcount "27"
            wcs_rangeset_axes "bands"
            wcs_rangeset_label "Atmospheric Levels"
            wcs_rangeset_name "bands"
        END
    END

so mapserver is reading netCDF from disk and producing geotiff output.

You might want to look at OpenGIS GALEON, http://galeon-wcs.jot.com/WikiHome which is looking at this format in terms of the OGC specs.

Hope this helps,

Norman



More information about the MapServer-users mailing list