I'm trying to build mosaics from NetCDF files using the indexer.xml file instead of the *.properties files so we can take advantage of the NetCDF auxiliary file. (Using GeoServer 2.14.2 btw)
My typical filenames look like: filename_201903031503.nc
And using the old properties files my timeregex.properties is:
regex=[0-9]{12},format=yyyyMMddhhmm
However I can't figure out how to pass the format parameter when using the indexer.xml file, I started with the following collector configuration:
format=yyyyMMddHHmm,regex=[0-9]{12}
TimestampFileNameExtractorSPI
time
As suggested on the following page: http://osgeo-org.1560.x6.nabble.com/ImageMosaic-indexer-xml-time-domain-custom-dimensions-td5144486.html
Unfortunately that gives me a Failed to create reader from file:data/supplier/product
error.
As a temporary solution I can rename the files to this: filename_20190303T150300Z.nc
Then the following XML works:
[0-9]{8}T[0-9]{6}Z
TimestampFileNameExtractorSPI
time
I'd really like to avoid renaming the files, they are supplied to us and I'd prefer to do zero/minimal processing. Is there a way to pass the date/time format to the collector using the indexer.xml file?
Answer
As Ian Turon suggested in his comment, turning on a higher level of logging identified the issue.
In this case the string used in the value parameter must be regex=[0-9]{12},format=yyyyMMddhhmm
not format=yyyyMMddhhmm,regex=[0-9]{12}
as shown in the example here.
No comments:
Post a Comment