I am trying to enable time dimension on my imageMosaic which consist of TIFF files served from S3. I've been following different GeoServer tutorials for setting up the mosaic:
- https://docs.geoserver.org/latest/en/user/data/raster/imagemosaic/index.html
- https://docs.geoserver.org/latest/en/user/tutorials/imagemosaic_timeseries/imagemosaic_timeseries.html
- https://docs.geoserver.org/stable/en/user/community/cog/update.html
First I pushed my TIFFs in COG format on S3 bucket and after that
created the directory esat3
which I browsed as root directory for my image mosaic store.
After store creation index shapefile is generated with all its accompanying files. I deleted them because I decided to use PostGIS table for indexing of my mosaic.
My datastore.properties
which is used for generating index props
user=postgres
port=5432
passwd=PW
host=HOST
database=esat
driver=org.postgresql.Driver
schema=public
SPI=org.geotools.data.postgis.PostgisNGDataStoreFactory
fetch\ size=1000
max\ connections=20
min\ connections=5
validate\ connections=true
Loose\ bbox=true
Expose\ primary\ key=false
Max\ open\ prepared\ statements=50
preparedStatements=false
Estimated\ extends=false
Connection\ timeout=20
I also defined and configured MOSAICNAME.properties
and indexer.properties
files
MOSAICNAME(esat3).properties
Cog=true
ExpandToRGB=false
TypeName=esat3
SuggestedFormat=org.geotools.gce.geotiff.GeoTiffFormat
SuggestedSPI=it.geosolutions.imageioimpl.plugins.cog.CogImageReaderSpi
Name=esat3
LevelsNum=9
PathType=RELATIVE
Heterogeneous=true
Caching=false
HeterogeneousCRS=false
LocationAttribute=location
Levels=0.25,0.25 1.0,1.0 2.0,2.0 4.0,4.0 8.0,8.0 16.0427807486631,16.0
32.25806451612903,32.25806451612903 65.21739130434783,64.51612903225806
130.43478260869566,133.33333333333334
CheckAuxiliaryMetadata=false
MosaicCRS=EPSG\:3765
indexer.properties
TimeAttribute=ingestion
Schema=*the_geom:Polygon,location:String,ingestion:java.util.Date
PropertyCollectors=TimestampFileNameExtractorSPI[timeregex](ingestion)
Name=esat3
timeregex.properties
can also be found on my directory
regex=[0-9]{4}.[0-9]{2}.[0-9]{2},format=yyyy.MM.dd
After datastore.properties
creation esat
database is generated automatically. I had to manually create table esat3
with all its columns (the_geom,location,ingestion
) defined inside indexer.properties -> schema
and also populate it the same way manually.
Column definitions esat3
:
-- Table: public.esat3
-- DROP TABLE IF EXISTS public.esat3;
CREATE TABLE IF NOT EXISTS public.esat3
(
the_geom geometry(Geometry,3765),
location character varying(255) COLLATE pg_catalog."default",
ingestion timestamp without time zone
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE IF EXISTS public.esat3
OWNER to postgres;
Here is example of my location path:
http://192.168.180.132:9444/esat/2020.04.27.tif
It all works fine. My images are properly rendering when I fetch them over WMS. The only problem is I can't enable time dimension. It says Cannot enable, no attribute of type Date found. I tried with different date time formats on ingestion
column in PostgreSQL but there isn't any effect. What am I overlooking? I have already spent few days trying to figure this out.