Skip to content

PYR1-1686 Publish GeoPackage layers under the path-joined store name - #100

Merged
danielhvs merged 2 commits into
mainfrom
PYR1-1686-geopackage-layer-name
Sep 10, 2026
Merged

danielhvs merged 2 commits into
mainfrom
PYR1-1686-geopackage-layer-name

Conversation

@danielhvs

Copy link
Copy Markdown
Collaborator

Fixes Risk -> Ignition Pattern "Transmission lines" showing no data for
impacted structures, fire area and fire volume on development and staging.

The bug

file-spec->layer-specs named the published feature type differently per store
type. :shapefile aliased to store-name, the relative path joined with
underscores. :geopackage aliased to layer-name, the bare basename. Nested
GeoPackages therefore lost their directory prefix:

want: fire-risk-forecast_tlines_20260909_06:elmfire_landfire_fire-area_20260909_130000
got:  fire-risk-forecast_tlines_20260909_06:fire-area_20260909_130000

Pyregence parses the model and fuel back out of that layer name, then requires
its request filter set to be a subset of the layer's. The shortened name never
yields elmfire or landfire, so the lookup returned zero layers.

Relative burn probability was unaffected because it ships as GeoTIFFs through
the ImageMosaic path, which already used store-name.

The change

  1. The :geopackage branch aliases native-name to store-name, guards on
    (not= native-name store-name), and points the style at store-name.
  2. Three tests on file-spec->layer-specs. One asserts the nested case
    publishes the path-joined name; two pin the flat cases so the existing
    fire-detections layers keep the names they have.

Side effect worth noting

The validation and spatial-index paths in core.clj already addressed layers as
workspace:store-name. For nested GeoPackages that name did not exist, so those
checks were querying a layer that was never published. They line up now.

The :geopackage branch aliased the feature type to the bare filename while
:shapefile used store-name, so nested files lost their directory prefix:
elmfire/landfire/fire-area_TS.gpkg published as fire-area_TS rather than
elmfire_landfire_fire-area_TS. Pyregence parses the model and fuel back out
of that name, so Risk with Ignition Pattern "Transmission lines" matched no
layers for impacted structures, fire area and fire volume.

@lambdatronic lambdatronic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the comments on lines 250-252 in core.clj? Otherwise, this looks fine to me.

Are we sure this isn't going to cause any trouble for the other GeoPackage layers that aren't in the risk tab, such as the various optional (checkbox) layers?

@danielhvs

Copy link
Copy Markdown
Collaborator Author

Can you remove the comments on lines 250-252 in core.clj? Otherwise, this looks fine to me.

Are we sure this isn't going to cause any trouble for the other GeoPackage layers that aren't in the risk tab, such as the various optional (checkbox) layers?

I'll take this to dev and test it there today to confirm it all

@danielhvs

danielhvs commented Sep 10, 2026 •

Copy link
Copy Markdown
Collaborator Author

testing...

image

I've de-then-reregister both tlines and us-transmission-lines.
LGTM, @lambdatronic

@danielhvs
danielhvs dismissed lambdatronic’s stale review September 10, 2026 19:21

Katy also tested and reported OK

@danielhvs
danielhvs merged commit fe79cf6 into main Sep 10, 2026
1 check passed
@danielhvs
danielhvs deleted the PYR1-1686-geopackage-layer-name branch September 10, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants