PYR1-938: register weather and risk time series as ImageMosaics - #98
Draft
danielhvs wants to merge 3 commits into
Draft
PYR1-938: register weather and risk time series as ImageMosaics#98danielhvs wants to merge 3 commits into
danielhvs wants to merge 3 commits into
Conversation
added 3 commits
August 13, 2026 14:46
Weather and risk forecasts land as one GeoTIFF per timestep, so a 72-hour cycle registers 72 layers instead of one layer with 72 timesteps. Spread forecasts avoid this only because pyrecast-scripts builds their mosaic directories before upload; nothing does that for weather and risk, whose producers live in other codebases. 1. Add convert-time-series-to-imagemosaics!, which folds every flat group of `<layer>_<YYYYMMDD>_<HHMMSS>.tif` files into an ImageMosaic directory named after the group's layer prefix. Re-running only moves newly arrived timesteps, so a growing forecast cycle keeps folding in. 2. Gate it on a new :imagemosaic-workspaces config key, a vector of workspace regexes. Deployments that do not set it keep registering one layer per file. 3. Ship the datastore/indexer/timeregex templates as resources, and add "resources" to the uberjar's :resource-dirs, which had been overridden to src/sql and so dropped the whole directory from the jar. 4. Set group write on the directories and files geosync creates, since GeoServer runs as tomcat and writes its granule index alongside the GeoTIFFs. Verified on geoserver-dev against a copy of gfs0p25/20260813_12: 1798 flat GeoTIFFs folded into 10 mosaic directories, all 10 publishing a WMS time dimension.
The `<layer>_<YYYYMMDD>_<HHMMSS>.tif` name is already the time-series convention, so matching it is the opt-in and :imagemosaic-workspaces was buying nothing. Weather and risk workspaces can be deregistered and re-registered at will, so there was no migration to stage either. Only rasters fold. The timestamped shapefiles under psps_zonal and fire_detections keep publishing one layer per timestep, now covered by a test.
The ncWMS plugin is already deployed (gs-ncwms-2.19-SNAPSHOT.jar) and its GetTimeSeries operation returns a whole time series at a point in one request. It was unusable because geosync creates mosaic coverages with no band metadata, so the operation failed with "available property names are" and an empty list. GeoServer does not fill the bands in itself here because the store is created with configure=none. Measured on geoserver-dev against hrrr ws, 49 timesteps: GetTimeSeries 1 request 153 ms 1534 bytes GetFeatureInfo x49 49 requests 675 ms Values agree at every timestep. This also closes the "Dimensions tab throws errors" item in the FIXME directly below. Callers must pass PROPERTYNAME=GRAY_INDEX: NcWmsService.java:179 on 2.19 calls getPropertyNames().get(0) before checking size, so omitting it throws IndexOutOfBoundsException rather than defaulting to the first band.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Register weather and risk time series as ImageMosaics instead of one layer per
timestep, so a single layer carries the whole time dimension.
<layer>_<yyyyMMdd>_<HHmmss>.tifgroup in a directory into aper-parameter ImageMosaic directory before registration. Files are moved, not
linked, so
gis-file-seqdoes not register them twice. Untimestamped rasters,timestamped shapefiles (psps_zonal, fire_detections) and directories that are
already mosaics are left alone.
GRAY_INDEXband on mosaic coverages. Without band metadata thencWMS
GetTimeSeriesrequest fails, which is the request that returns thewhole series at a point in one call.
resources/in the uberjar. The:resource-dirs ["src/sql"]overridewas dropping the whole
resources/tree, including the new mosaic propertytemplates.
datastore,indexer,timeregex); the datastore uses the existing Tomcat JNDI PostGIS pool.directories, shapefile and untimestamped-raster passthrough, and the band
declaration.
Frontend side: pyregence#1144 - PYR1-938 Read Point Info time series from
ImageMosaics. Both have to
ship together - the frontend reads the series from the mosaics this PR creates.