Vector tiles POC#2
Open
honzaflash wants to merge 8 commits into
Open
Conversation
honzaflash
commented
Jan 1, 2026
Collaborator
- add support for multiple layers in GetMap
- execute existing logic sequentially for each DataArray (each layer)
- likely not optimal for performance but easy enough to implement for a proof of concept
- execute existing logic sequentially for each DataArray (each layer)
- add an alternate style that produces identical output to raster/arrows except it uses two layers with u and v vector components
honzaflash
force-pushed
the
vector-tiles
branch
from
January 21, 2026 20:12
1c3a18b to
c0a1977
Compare
- move the mesh generation and shading from `render` body to their own methods and refactor small things
- also use autoscale when `colorscalerrange` is `None` for type checker's sake even though
validation ensures this happens only when `autoscale` is `True`
- fix an overly narrow type hint (caused type error elsewhere)
- move styles related query parameter processing to its own function too and refactor a little
honzaflash
force-pushed
the
vector-tiles
branch
2 times, most recently
from
March 16, 2026 23:14
7d85f18 to
7c099b9
Compare
honzaflash
force-pushed
the
vector-tiles
branch
3 times, most recently
from
March 24, 2026 18:15
3ad2610 to
f8e6a6b
Compare
- get_map.py was getting long so move it into a submodule
- update the GetMap query model
- add new `styles` for vector visualizations (`vector-arrow/*`,
`vector-arrow-color/*`)
- add `color` and `density` parameters (intended mainly for vectors)
- add support for multiple layers in GetMap
- split layer string on ',' and process a list of layers instead of a single layer
- execute existing logic sequentially for each DataArray (each layer)
- this is likely not optimal for performance but easy enough to implement for a proof of concept
- add new vector styles that use two layers (assumes layers are u, v components)
- options for a magnitude colormap background with normalized vector arrows,
and normalized vector arrows colored by magnitude
- implement `get_minmax` for vectors
- treat multiple layers as a pair of vector components
- for vector layers, get min/max from their magnitude
- refactor GetMap to store output style options nested in a dict
instead of flat as attributes of GetMap
- this way the class isn't polluted by attributes not relevant
to the used rendering style
- type checker can infer stuff based on the discriminator field (`styles.type`)
- add tests for new GetMap styles
- test query parameter parsing for the vector and colormap style options
- refactor how GetMap handles minmax request - move minmax computation out of the render method - and centralize it in the get_minmax method
- not actually sure why the try-catch wrapped line is the one raising the error but it seems like it is (must be some laziness) - if error happens for a vector layer, try to compute a ceiling max based on max values of the vector components
honzaflash
force-pushed
the
vector-tiles
branch
from
April 21, 2026 22:10
6bc87c5 to
059fd48
Compare
- before the layer metadata endpoint would return the single elevation value instead of a list as expected
- if there is only one elevation value the retrieved elevations
is a 0-dim array and using `.tolist()` on it would turn it into
a plain float instead of a list
- now we convert the 0 dimensional array of elevations to a 1D array
- and when selecting by elevation we return the input DataArray early
because there is nothing to select
because of the varible being scalar
- refactor the pydantic query model to validate and parse the layer names - refactor get_metadata function to handle the list of layers - implement layerdetails for multiple layers/pair of vector layers - support timesteps for vector layers (return time steps of first layer)
- remove redundant logic - then remove unused parameters and imports - make layers query parameter optional (it's not currently used)
honzaflash
force-pushed
the
vector-tiles
branch
from
April 21, 2026 23:17
059fd48 to
9b50478
Compare
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.