Skip to content

Render class rasters through pysepal's add_raster - #23

Open
dfguerrerom wants to merge 1 commit into
cleanup/tile-band-aidsfrom
cleanup/class-raster-to-pysepal
Open

Render class rasters through pysepal's add_raster#23
dfguerrerom wants to merge 1 commit into
cleanup/tile-band-aidsfrom
cleanup/class-raster-to-pysepal

Conversation

@dfguerrerom

Copy link
Copy Markdown
Contributor

Cleanup item (h), and (e) falls out with it.

Stacked on #22 — review that one first. This PR targets cleanup/tile-band-aids so its diff shows only the raster work; GitHub will retarget it to main once #22 merges.

Categorical rendering was never app-specific, so the discrete LUT, the server-side registration that preserves per-class alpha, and the COG preparation now live in SepalMap.add_raster behind a class_colors parameter. SbaeMap inherits it, which removes the local add_class_raster, _optimize_for_tiles, _build_class_colormap and scripts/tiling.py. The inert LOCALTILESERVER_HOST knob goes with the TileClient call that carried it — nothing set it, and TileClient already defaulted to 127.0.0.1.

Call sites moved to keywords: add_raster's positional order differs from the old method's, so the previous positional calls would have bound layer_name to bands.

Blocked on pysepal 3.9.0 and vectortileserver 0.2.2. Tests: 195 passed.

Categorical rendering was never app-specific: the discrete LUT, the
server-side registration that keeps per-class alpha, and the COG preparation
now live in SepalMap.add_raster behind class_colors. SbaeMap just inherits it,
so the local add_class_raster, _optimize_for_tiles, _build_class_colormap and
scripts/tiling.py all go, and the inert LOCALTILESERVER_HOST knob goes with
the TileClient call that carried it.

classification_layer was assigned twice and read nowhere; dropped.

Needs pysepal 3.9.0.
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.

1 participant