COG in ImageMosaic with data containing custom dimension

60 views Asked by At

I have to work with data that contains, among others, a custom dimension (i.e., "pressure level"). Specifically, I have a dataset defined on lat, lon, time and plev dimensions.

The native data is in NetCDF format. Using some python libraries, I am able to generate valid COG files out of it, where each COG is 2-dimensional (i.e., lat and lon).

The timestamp is reported in the name convention of the COG file. Therefore, using the ImageMosaic I am able to deal with the time dimension. In fact, Geoserver understand the time domain thanks to the timeregex.properties file.

I wonder whether there is a similar method to account for the custom dimension as it is done for the time dimension. In other words, I need Geoserver to correctly interprete also the Pressure Level dimension of the data considering I need to have COG format and use the ImageMosaic functionality.

Regards, M

1

There are 1 answers

0
Vahe Karamyan On

To define additional dimensions in GeoServer Mosaic Indexer, you can leverage the indexer.properties file. Below is an example configuration where a pressure level dimension is added

MosaicCRS=EPSG:4326
PropertyCollectors=CRSExtractorSPI(crs),ResolutionExtractorSPI(resolution),TimestampFileNameExtractorSPI[timeregex](time),StringFileNameExtractorSPI[pressureLevelRegex](pressureLevel)
Schema=*the_geom:Polygon,location:String,crs:String,resolution:String,time:java.util.Date,pressureLevel:String
AdditionalDomainAttributes=pressureLevel(pressureLevel)
TimeAttribute=time

In this example, the pressureLevelRegex is specified to extract the pressure level information from each TIFF file and populate the pressureLevel attribute in the mosaic table. It is crucial to have the pressureLevelRegex file configured to ensure proper extraction.

After creating the mosaic with this configuration you will see pressure level available in the UI.