[Geoserver-users] adding new coverage

Hi,

I want to add and serve a new coverage (NetCDF file) from geoserver. I am not sure if that format is supported yet. Therefore, I would like to know which packages in geoserver I should modify or look into.

Cheers,

Adit

Adit Santokhee ha scritto:

Hi,

I want to add and serve a new coverage (NetCDF file) from geoserver. I am not sure if that format is supported yet. Therefore, I would like to know which packages in geoserver I should modify or look into.

That format is not supported. Yet, if the netcdf package in geotools
does support the Format/Reader architecture all other readers abide to,
you should be able to add that module to the geoserver/web/pom.xml
dependencies, rebuild, and the format should appear in the coverage
store list.

Cheers
Andrea

Hi Andrea,

Yet, if the netcdf package in geotools
does support the Format/Reader architecture all other readers abide to

Could you provide more details please? By the way, at the moment is this the
only way to do this?

Cheers,

Adit

-----Original Message-----
From: Andrea Aime [mailto:aaime@anonymised.com]
Sent: 14 April 2008 12:15
To: Adit Santokhee
Cc: 'geoserver users'
Subject: Re: [Geoserver-users] adding new coverage

Adit Santokhee ha scritto:

Hi,

I want to add and serve a new coverage (NetCDF file) from geoserver. I
am not sure if that format is supported yet. Therefore, I would like to
know which packages in geoserver I should modify or look into.

That format is not supported. Yet, if the netcdf package in geotools
does support the Format/Reader architecture all other readers abide to,
you should be able to add that module to the geoserver/web/pom.xml
dependencies, rebuild, and the format should appear in the coverage
store list.

Cheers
Andrea

Adit Santokhee ha scritto:

Hi Andrea,

Yet, if the netcdf package in geotools
does support the Format/Reader architecture all other readers abide to

Could you provide more details please?

Well, I'm not the coverage expert (Martin and Simone are), but you could
get a quick overview by looking at a very simple coverage reader plugin,
the gtopo30 one:
http://svn.geotools.org/geotools/trunk/gt/modules/plugin/gtopo30

Basically there are three major elements:
* the format factory, a factory that given a URL decides whether
   it can open the file pointed by the URL and produce a Reader
* the Reader, that actually performs the reading (this one
   can take some parameters in to affect its behaviour, like
   the current area of interest and target pixel resolution)
* the SPI registration, which is this file:
http://svn.geotools.org/geotools/trunk/gt/modules/plugin/gtopo30/src/main/resources/META-INF/services/org.geotools.coverage.grid.io.GridFormatFactorySpi
listing the fully qualified name of all the FormatFactory
included in the jar.

The latest is what the plugin system uses to locate the format
factories. Basically, you provide a URL to a factory locator,
which finds all the factories using those services file,
instantiates them, ask them if they support the format, if
so, a reader is created and eventually a coverage is extracted
out of it for serving with WCS or with WMS.

By the way, at the moment is this the only way to do this?

Yes, it's the only way unless you change drastically how
coverages are handled in GeoServer catalog.

Cheers
Andrea