[geotk] Reading netcdf GMT GRD as coverage

Brian Schlining bschlining at gmail.com
Thu Feb 10 14:06:49 EST 2011


Hi,

I'm trying to read a netcdf file using geotoolkit's coverageio api. The
netcdf files is a GMT GRD format; the CDL for it is:

netcdf MontereyCanyon_UTM50 {
dimensions:
x = 5083 ;
y = 4067 ;
variables:
double x(x) ;
x:long_name = "Easting (meters)" ;
x:actual_range = 422985.277598382, 677085.277598382 ;
double y(y) ;
y:long_name = "Northing (meters)" ;
y:actual_range = 3915514.90677777, 4118814.90677777 ;
float z(y, x) ;
z:long_name = "Topography (m)" ;
z:_FillValue = NaNf ;
z:actual_range = -4032.4375, -16.2922439575195 ;

// global attributes:
:Conventions = "COARDS/CF-1.0" ;
:title = "Topography Grid" ;
:description = "\n",
"\tProjection: UTM10N\n",
"\tGrid created by mbgrid\n",
"\tMB-system Version 5.1.3beta1865\n",
"\tRun by <mappingauv> on <pumice.shore.mbari.org> at <Thu Jul 15 18:07:13
2010>" ;
:GMT_version = "4.5.2" ;
}


I'm trying the following:

GridCoverageReader reader = new ImageCoverageReader();
reader.setInput(new File("/Users/brian/Desktop/MontereyCanyon_UTM50.grd"));

but it barfs with the following message:
'org.geotoolkit.coverage.io.CoverageStoreException: Can't read file
"MontereyCanyon_UTM50.grd"'.

Does geotk support GRD files or am I just doing the wrong thing? Any
pointers are appreciated.

Thanks

-- 
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Brian Schlining
bschlining at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geotoolkit/attachments/20110210/f4fcdf47/attachment.html


More information about the Geotoolkit mailing list