+ All Categories
Home > Documents > Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux,...

Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux,...

Date post: 29-Jan-2016
Category:
Upload: jonah-fitzgerald
View: 221 times
Download: 0 times
Share this document with a friend
Popular Tags:
26
Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer
Transcript
Page 1: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Managing WMS and WCS on multidimensional NetCDF Datasets with

Geoserver

•Martin Desruisseaux, Geomatys

•Mickael Treguer, Ifremer

Page 2: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Ocean physics

Ifremer

National institute of marine research, the French public institute for marine research, Ifremer contributes, through studies and expert assessments, to knowledge about the ocean and its resources, monitoring of marine and coastal zones and the sustainable development of maritime activities.To these ends, it designs and operates observational, experimental and monitoring tools and facilities. Ifremer manages the ocean research fleet for the French scientific community.

Fisheries and aquaculture Ocean floors

Page 3: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Example of gridded datasets

Physical Oceonography• Temperature and Salinity• Sea Surface Temperature• Current• Wave• …

Biological Oceanography• Ocean color (chlorophyll)

Digital Elevation Model (DEM) …

Page 4: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

NetCDF (Common Data Form)

Binary format suitable for lots of different data types

• portable self-describing binary data format.

• NetCDF is used extensively in the atmospheric and oceanic science communities.

Climate and Forecast conventions should be applied to environmental data if possible

• for correct labelling of axes (latitude, longitude, time, pressure, etc)

• for standard naming of variables (sea_water_potential_temperature etc)

Can also be dissiminated via the protocol OPeNDAP

• you access data using a URL

Allow GIS clients to access NetCDF/OPeNDAP datasets via standards-based interface (WMS, WCS)

Page 5: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

4-D web mapping

A number of mapping systems are now available on the web

• Most mapping software assumes two-dimensional data (x-y)

Environmental science data is dynamic and four-dimensional (x-y-z-t)

OGC WMS/WCS support 4(plus)-D data (elevation, time)

• But not many servers or clients support the full specification

Page 6: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

OGC NetCDF architectureClient Application

(Mapbuilder)

WCS

NetCDF Interface

(Unidata)

OpenDAP

netCDF files

WMS

GeoServer / GeoTools

Page 7: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

SeaGrid

•“SeaGrid” website provides very quick visualisations of gridded data

•Images generated dynamically on the server

Page 8: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Selection of depth

depth levels available on

the data

<Layer queryable="1">

<Name>geom:coriolis</Name>

...

<Dimension name="elevation" units="EPSG:5030"/>

<Extent name="elevation" default="5">5,10,20, ... ,1850,1900,1950</Extent>

...

</Layer>

Page 9: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Selection of time

time available on the data

animation

<Layer queryable="1">

<Name>geom:coriolis</Name>

...

<Dimension name="time" units="ISO8601"/>

<Extent name="time" default=" 2007-06-20T14:00:00Z ">2007-06-06T14:00:00Z,2007-06-13T14:00:00Z,2007-06-20T14:00:00Z</Extent>

...

</Layer>

Page 10: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

WCS

Draw a bbox to extract raw raster

data

GetCoverage WCS

specification

Page 11: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Future enhancements

It is planned to improve :• Extraction WCS

– Official supported format : GeoTiff, HDF-EOS, DTED, NITF, GML

– Add Netcdf output (convention CF)

It is planned to provide :•Access to opendap (distributed datasets)

•WMS GetFeatureInfo to retreive geophysical data

•Display wind/current fields as vectors (directions and intensities)

Page 12: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Past work

In GeoTools– Wrote initial referencing module– Wrote initial coverage module

• Strong focus on geophysics data• Some processing capabilities• No raster input/output

On SourceForge– Created SeaGIS in 2002– Raster input/output performed there, requiring database– Initially designed for a specific problematic (fisheries...)– Running since 2002, trying to generalize since that time

Page 13: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Topics

PostGrid as a coverage catalog

Geographic Image I/O

Page 14: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Coverage catalog

« PostGrid » is a schema in a PostGIS database Contains coverage metadata, not pixel values Used as an index for fast coverage lookup

– Which data are available (what, where, when…)– How to get the data (filename, format…)– What the pixel values means (categories…)

Images stay files in their native format (NetCDF, PNG…)

Page 15: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Current PostGrid scope

Envelope up to 4 dimensions (x,y,z,t)– Mandatory horizontal (x,y)

• The SRID must be supported by PostGIS• The « grid to CRS » transform must be affine

– Optional vertical (z)• SRID must be provided, but doesn't need to be supported• Ordinates as an array of values

– Optional temporal (t)• Set of time ranges

Horizontal slices in arbitrary files for different (z,t)

Page 16: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Current PostGrid scope

Envelope up to 4 dimensions (x,y,z,t)– Mandatory horizontal (x,y)

• The SRID must be supported by PostGIS• The « grid to CRS » transform must be affine

Page 17: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Affine transform versus envelope

Can compute one from the other...

• grid range • affine transform• envelope

• coordinate reference system

... but envelopes are ambiguous!

– Do we reverse y axis direction?– Do we swap axes (x,y) → (y,x)?– What about oblique grids?

Always specify Transform rather than Envelope when possible

...but envelopes are still valuable for indexing!

Page 18: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Database schema overview

• identifier• layer• path• format

Series

• series• filename• startTime• endTime• extent

GridCoverages

• identifier• width, height• scaleX, scaleY, ...• horizontalSRID• horizontalExtent• verticalSRID• verticalOrdinates

GridGeometries1 ∞ ∞ 1

• An indexed geometry column• Always in WGS84 (not image CRS)• Automatically generated by trigger

Formats SampleDimensions Categories1 ∞ 1 ∞

1

Page 19: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Categories

Pixel values ↔ Geophysics values

0 = no data ↔ NaN0

1 = clouds ↔ NaN1

2 = land ↔ NaN2

3 .. 255 = temperature ↔ -3 .. 40°C

Tell what the pixel values means Convert to and from geophysics values They are not styling Required even if the data are already geophysics

– Relationship to pixel values is typically fixed for a data set– What this NaN value is? (clouds, land...)

Page 20: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

PostGrid library

GeoServer

PostGrid

Image I/O

PostGrid

GeoServer

Page 21: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Evaluation at a direct position

Data Operation InterpolationsSpatial

(bicubic)Temporal

(linear)

Finalvalue

Page 22: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Geographic Image I/O

Image I/O

Geographic Image I/O Geographic Image Metadata

Coverage I/O Grid Coverage

GeoServer PostGrid

NETCDF GML in JPEG2000

Rendered Image

Page 23: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

ImageReader specializations

ImageReader

GeographicImageReader

FileImageReader

NetcdfImageReader

• Convenience class only; ignore if you want• Creates IndexColorModel from (min,max) and data type

• Support for implementations that can't read a stream

• 3th dimension (often z) as bands, but doesn't have to

Page 24: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Geographic Image Metadata

Subclass of IIOMetadataFormat Almost the only committed API

Page 25: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Demo

Page 26: Managing WMS and WCS on multidimensional NetCDF Datasets with Geoserver Martin Desruisseaux, Geomatys Mickael Treguer, Ifremer.

Questions?


Recommended