[Geoserver-users] imagemosaic datetime error upload

Hello everyone,

I have just started using Geoserver on my local computer and I am having some problems with the image mosaic. My goal is to upload in geoserver several geotiffs of a precipitation event. The files contain date and time attributes (5-minute intervals) and they are named as such: pr_20150612T122500000Z_0600.000.tiff

I follow the tutorials in this link https://docs.geoserver.org/main/en/user/tutorials/imagemosaic_timeseries/imagemosaic_time-elevationseries.html and set the properties files as such:

elevationregex.properties:
regex=(?<=)(\d{4}\.\d{3})(?=)

timeregex.properties:
regex=[0-9]{8}T[0-9]{9}Z(?!.*[0-9]{8}T[0-9]{9}Z.*)

indexer.properties:
Caching=false
TimeAttribute=ingestion
ElevationAttribute=elevation
Schema=*the_geom:Polygon,location:String,ingestion:java.util.Date,elevation:Double
PropertyCollectors=TimestampFileNameExtractorSPItimeregex,DoubleFileNameExtractorSPIelevationregex

However, I have been getting an error, see attached.

Beyond that, I tried with the files available in the tutorial and it did not work. On the other hand, I was able to upload image mosaics using only the date without time.

Can someone guide me to a solution to this problem? Beyond that, I have read that I could set up a xml file inside my folder to upload the image mosaic, is this a better idea? Do you have some xml sample for my geotiffs, I tried some and it did not work as well.

PS: I have tried to save my geotiff folder in different paths and it did not work

Thank you in advance and I wish you a good day!

Best regards
Bruno Castro

error1.PNG

···

Bruno Parente Leitão de Castro

Graduado em Engenharia Ambiental e Sanitária
Instituto Federal de Educação, Ciências e Tecnologia do Ceará - IFCE

On Friday, 8 December 2023 7:31:56 PM AEDT Bruno Parente wrote:

However, I have been getting an error, see attached.

The screenshot is very hard to read, and I'm not very familiar with deployment
on Windows, but it looks like:
1. you are using an invalid URL - file:/// or file:/ are probably OK, but
file:// is not
2. you possibly have a typo - is it really geoserver_files ?

Brad

Hello Brad,

thank you for the reply, I tried to change the URL and it did not work. They are geoserver files because I managed to deploy them with the same path in the screenshoot using only the date format without the time. Below you can find the error message:

Could not list layers for this store, an error occurred retrieving them: Failed to create reader from file:\coverages/timeseries and hints Hints: REPOSITORY = org.geoserver.catalog.CatalogRepository@anonymised.com EXECUTOR_SERVICE = java.util.concurrent.ThreadPoolExecutor@…11897…[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] System defaults: STYLE_FACTORY = org.geotools.styling.StyleFactoryImpl@anonymised.com LENIENT_DATUM_SHIFT = true FORCE_LONGITUDE_FIRST_AXIS_ORDER = true FORCE_AXIS_ORDER_HONORING = http COMPARISON_TOLERANCE = 1.0E-8 FILTER_FACTORY = FilterFactoryImpl FEATURE_FACTORY = org.geotools.feature.LenientFeatureFactoryImpl@anonymised.com GRID_COVERAGE_FACTORY = GridCoverageFactory TILE_ENCODING = null

Bruno

···

Bruno Parente Leitão de Castro

Graduado em Engenharia Ambiental e Sanitária
Instituto Federal de Educação, Ciências e Tecnologia do Ceará - IFCE

Hi Bruno,

I have the same problem. It only works when using dates, but when using a datetime it doesn’t recognize the dates. Maybe you managed to solve it?

I used the following setup:

datastore.properties
SPI=org.geotools.data.postgis.PostgisNGDataStoreFactory
host=localhost
port=5432
database=geoserver
schema=public
user=****
passwd=****

indexer.properties
Caching=false
TimeAttribute=ingestion
ElevationAttribute=elevation
Schema=*the_geom:Polygon,location:String,ingestion:java.util.Date,elevation:Double
PropertyCollectors=TimestampFileNameExtractorSPI timeregex

timeregex.properties
regex=[0-9]{8}T[0-9]{9}Z(?!.*[0-9]{8}T[0-9]{9}Z.*)

The files contain date and time attributes and they are named as such:
precipitation_20241003T000000000Z.tif
precipitation_20241003T010000000Z.tif
precipitation_20241003T020000000Z.tif
precipitation_20241003T030000000Z.tif