Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
255 commits
Select commit Hold shift + click to select a range
2ba59f8
rework grid blit to work with offsets
jdroenner Oct 13, 2023
f864afc
no red datatypes
jdroenner Oct 25, 2023
ba2f74f
fix tests add more methods
jdroenner Nov 7, 2023
c567276
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Feb 5, 2024
c65523c
more adaptions to pixel queries
jdroenner Feb 5, 2024
5bdc98b
wip
jdroenner Mar 29, 2024
b2d6156
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Apr 12, 2024
4f9f4c3
wip
jdroenner Apr 12, 2024
26c49ac
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Apr 12, 2024
153a91a
fix subquery
jdroenner Apr 12, 2024
c023cab
fix geotransform calculation in gdal source, add note about issue wit…
jdroenner Apr 12, 2024
d1993c5
fix gauss kernel test
jdroenner Apr 13, 2024
7e2a494
fix test queries
jdroenner Apr 15, 2024
cd80d37
fix test query for n agg
jdroenner Apr 15, 2024
7ce031e
remove assert thats not always true
jdroenner Apr 15, 2024
b47129f
interpolation sub query bounds calculation
jdroenner Apr 15, 2024
6ee5f92
adapt interpolation test
jdroenner Apr 15, 2024
5df6115
more adaptations
jdroenner Apr 15, 2024
1f529a2
projection tests
jdroenner Apr 16, 2024
581ff7f
adapt raster vector join tests
jdroenner Apr 16, 2024
7c8e07a
remove test ouptuts
jdroenner Apr 16, 2024
7c39fca
add optional bounds points mock source, adapt rasterization tests
jdroenner Apr 16, 2024
be35b4b
remove prints
jdroenner Jul 30, 2024
40d1a5d
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Aug 1, 2024
96daf3b
adapt to changes
jdroenner Aug 1, 2024
059249a
building again
jdroenner Aug 20, 2024
6bb07c9
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Aug 22, 2024
c75cff4
building operators
jdroenner Aug 30, 2024
585b073
remove debug output
jdroenner Aug 30, 2024
e1d859c
more tests
jdroenner Sep 6, 2024
b270995
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Sep 6, 2024
1dc22b9
adapt to changes
jdroenner Sep 6, 2024
efd3a64
remove debug output
jdroenner Sep 6, 2024
f89e31a
remove dbg! calls
jdroenner Sep 6, 2024
a1bc2cb
more tests
jdroenner Sep 10, 2024
5de2abf
clippy fix datatypes
jdroenner Sep 10, 2024
944e562
fix clippy things in services
jdroenner Sep 10, 2024
3b15301
clippy lints and reduce complexity
jdroenner Sep 10, 2024
c53144c
more lints and renames
jdroenner Sep 10, 2024
1ef0cbc
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Sep 10, 2024
0f4a8d0
adapt cache text
jdroenner Sep 11, 2024
9e9d115
more lints
jdroenner Sep 11, 2024
24cad6c
use correct type ein api
jdroenner Sep 14, 2024
8550edf
interpolation: reuse geotransform and use fail safe lookup
jdroenner Sep 23, 2024
b5df687
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Sep 23, 2024
50010bf
remove unused methods
jdroenner Sep 23, 2024
5b57b1e
update tests
jdroenner Sep 23, 2024
66411b7
togeotiff: don't set tiled for COG
jdroenner Sep 23, 2024
b063456
use type from api model in dataset handlers
jdroenner Sep 26, 2024
2d5f798
reuse pixel to tiling logic
jdroenner Oct 4, 2024
7682e6e
remove resolution from VectorStreamQuery
jdroenner Oct 4, 2024
d244bf0
RasterWebsocketStream: log why stream was closed
jdroenner Oct 4, 2024
cb790ec
use SpatialReference to lookup specs
jdroenner Oct 4, 2024
78a7099
remove unused code
jdroenner Oct 4, 2024
698b086
add MlModelResource conversion
jdroenner Oct 4, 2024
38c86fa
adapt dataset
jdroenner Oct 4, 2024
8e6ad61
streamline tiling
jdroenner Oct 7, 2024
43d4c6b
tiling cleanup and adapt s2 stac provider
jdroenner Nov 5, 2024
28a427b
change how raster bounds are reprojected: use actual coords and disca…
jdroenner Nov 5, 2024
018d412
prepare up side down raster reading
jdroenner Nov 5, 2024
d5bc272
Merge branch 'update-deps-2024-12-06' of github.com:geo-engine/geoeng…
jdroenner Dec 7, 2024
35ccfd9
update test images
jdroenner Dec 7, 2024
0d0e041
workflow optimization (wip)
michaelmattig Jan 30, 2025
8c1bd2d
add downscaled ndvi test data set
michaelmattig Feb 5, 2025
0eb7e4a
optimization for interpolation
michaelmattig Feb 5, 2025
d311e42
downsampling optimization
michaelmattig Feb 5, 2025
5af02bd
projection optimization
michaelmattig Feb 6, 2025
9e7cca0
optimization in wms and wcs
michaelmattig Feb 7, 2025
89c83c2
test optimization in wms
michaelmattig Feb 11, 2025
dd413af
optimization for rasterization
michaelmattig Feb 12, 2025
e48eec3
optimization of raster vector join
michaelmattig Feb 12, 2025
7f1145f
test optimization on finer resolution
michaelmattig Feb 12, 2025
d5c9530
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Feb 13, 2025
ef99c7f
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Feb 13, 2025
b71124d
lintst & SpatialReference by value
jdroenner Feb 13, 2025
b8b1915
implement optimization for more operators
michaelmattig Feb 13, 2025
c4624af
solve Fixme on partitions_extent
jdroenner Feb 14, 2025
82ef5cf
fmt
jdroenner Feb 14, 2025
fc1fccb
Merge branch 'new-pixel-based-queries-rebase' of github.com:geo-engin…
michaelmattig Feb 14, 2025
e8685a1
test optimization of complex workflow
michaelmattig Feb 14, 2025
bfb8691
optimization for plots
michaelmattig Feb 14, 2025
72614a6
clean up code
michaelmattig Feb 17, 2025
d633247
bring back flip-y and add overview level loading
jdroenner Mar 3, 2025
429709e
cleenup
jdroenner Mar 3, 2025
3307ac7
adapt tests
jdroenner Mar 3, 2025
2e0233f
Merge branch 'new-pixel-based-queries-rebase' of github.com:geo-engin…
michaelmattig Mar 5, 2025
9541330
fix gdal source initialization
michaelmattig Mar 5, 2025
b2b873f
add test that optimization removes redundant upsampling
michaelmattig Mar 5, 2025
54c4c11
remove enum from RasterResultDescriptor
jdroenner Mar 10, 2025
6f67ca9
lints
jdroenner Mar 10, 2025
7ede088
migration of RasterResultDescriptor
jdroenner Mar 10, 2025
b8901bc
remove sentinel-2 zones and bands from provider
jdroenner Mar 17, 2025
ede9398
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Mar 17, 2025
473346c
adapt to main changes
jdroenner Mar 17, 2025
c0b7355
fix tests
jdroenner Mar 18, 2025
2c5e952
move s2 provider zones
jdroenner Mar 18, 2025
edb5131
lints
jdroenner Mar 18, 2025
b285e0c
fix test
jdroenner Mar 22, 2025
7720af5
use TimeInterval in netcdf tests
jdroenner Mar 26, 2025
4fdf795
fix gbif test
jdroenner Mar 27, 2025
e4ea42e
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Mar 27, 2025
6ab3d9e
bring back soem benches + linter
jdroenner Mar 28, 2025
5ed267d
fmt
jdroenner Mar 28, 2025
39e60c4
reduce wms cache test area
jdroenner Mar 28, 2025
e0d7ff0
update ndvi_list dataset
jdroenner Mar 28, 2025
e10aec9
sql lints
jdroenner Mar 28, 2025
9bea9a3
sql lints
jdroenner Mar 28, 2025
81cada5
sql lints
jdroenner Mar 28, 2025
3cbb822
sql lints
jdroenner Mar 28, 2025
2898a61
update dataset defs
jdroenner Mar 28, 2025
080910e
measurement serialization and use btreemap for classes
jdroenner Apr 8, 2025
00c50a6
adapt datasets api type
jdroenner Apr 9, 2025
5d24acc
don't fail on resolution=None
jdroenner Apr 10, 2025
78ec10e
update openapi
jdroenner Apr 10, 2025
874dcfd
lints
jdroenner Apr 10, 2025
efe3305
update RasterDatasetFromWorkflow schema
jdroenner Apr 11, 2025
aa2b2f9
update openapi
jdroenner Apr 11, 2025
acd9b69
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Apr 25, 2025
59e4c42
clippy :)
jdroenner Apr 25, 2025
a443118
clippy
jdroenner Apr 25, 2025
10fd4d0
clippy
jdroenner Apr 28, 2025
bc35469
copy gdal source
michaelmattig May 22, 2025
8ccc473
load single tile from multiple files (wip)
michaelmattig May 27, 2025
723a63b
load tiles from db (wip)
michaelmattig Jun 4, 2025
85e3811
rename type SpatialQuery to SpatialBounds
jdroenner Jul 8, 2025
b4d623e
rename field spatial_query -> spatial_bounds
jdroenner Jul 8, 2025
994028b
fmt
jdroenner Jul 8, 2025
2a63782
remove RasterSpatialQueryRectangle and use GRidBoundingBox2D direct
jdroenner Jul 8, 2025
9aedc41
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Jul 8, 2025
a878740
fix and test (wip)
michaelmattig Jul 16, 2025
aa8462f
clean up (wip)
michaelmattig Jul 16, 2025
a7f6312
more tests
michaelmattig Jul 22, 2025
5a9c51b
add test with reversed z index
michaelmattig Jul 23, 2025
0537178
clean up
michaelmattig Jul 24, 2025
1db8750
migration and tests
michaelmattig Jul 25, 2025
8d1c269
VisualPointClusteringParams
jdroenner Jul 28, 2025
1a3df84
LineSimplification only use epsilon
jdroenner Jul 28, 2025
01f1820
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Jul 28, 2025
e37233c
adapt to main chantes
jdroenner Jul 28, 2025
0a6fc6e
fmt
jdroenner Jul 28, 2025
114b99d
reorder migrations
jdroenner Jul 28, 2025
24568ea
remove pub in QueryRectangle
jdroenner Jul 28, 2025
89529cb
add text to reproject_spatial_grid_bounds
jdroenner Jul 28, 2025
81e8efe
cleanup QueryRectangle
jdroenner Jul 29, 2025
28e2bac
make MockQueryContext creation more private
jdroenner Jul 29, 2025
a47d498
chores
jdroenner Jul 29, 2025
3ff3231
trailing whitespace
jdroenner Jul 29, 2025
cd41949
bump version
jdroenner Jul 30, 2025
9e93682
rebase current_schema
jdroenner Jul 30, 2025
2a7ceec
reorder attributes make the test happy
jdroenner Jul 30, 2025
ac6e419
remove fixmes
jdroenner Jul 30, 2025
3112070
overview resolution for test pngs
jdroenner Jul 30, 2025
0284c80
update openapi
jdroenner Jul 31, 2025
4f7f539
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Jul 31, 2025
a6d5afa
update migration name
jdroenner Jul 31, 2025
b91ff80
fmt
jdroenner Jul 31, 2025
46f8fd5
move more to_dataset logic into task
jdroenner Aug 1, 2025
72d6b26
bring back density rasterization
jdroenner Aug 4, 2025
85550c5
more density rastizion
jdroenner Aug 4, 2025
7f2f65b
re-activate and fix tests
michaelmattig Aug 5, 2025
54c9661
bring back tests for density rasterizer
jdroenner Aug 6, 2025
f5d6bc1
remove todo from ArunaDataProvider
jdroenner Aug 6, 2025
db8685e
update sentinel providers
jdroenner Aug 6, 2025
1d30016
add multi tiles tests to operators crate
michaelmattig Aug 6, 2025
58f3678
add benchmark new vs old gdal source
michaelmattig Aug 7, 2025
7773b93
Merge branch 'new-pixel-based-queries-rebase' of https://github.com/g…
michaelmattig Aug 8, 2025
0dea877
fix bench and buffer new gdal source
michaelmattig Aug 12, 2025
9dd9418
clean up code
michaelmattig Aug 12, 2025
533d009
clippy
michaelmattig Aug 12, 2025
7e98ef8
example for importing tiles from a directory
michaelmattig Aug 12, 2025
0801749
fix edge case where no tile is inside query rectangle. fix layers wit…
michaelmattig Aug 13, 2025
1fdb4fc
fix test and clippy
michaelmattig Aug 13, 2025
0f7fcb2
clippy
michaelmattig Aug 15, 2025
19e7ed3
Merge branch 'new-pixel-based-queries-rebase' of https://github.com/g…
michaelmattig Aug 15, 2025
8b464ce
fix tests
michaelmattig Aug 15, 2025
a8157bf
clippy
michaelmattig Aug 18, 2025
5d8c31c
make pixel edge check more robust with respect to floating point impr…
michaelmattig Aug 18, 2025
f38e4bb
cargo fmt
michaelmattig Aug 18, 2025
6e9af78
Merge branch 'multi_band_gdal_source' of https://github.com/geo-engin…
michaelmattig Aug 18, 2025
6b48b85
optimize new gdal source
michaelmattig Aug 18, 2025
eca2827
fix(operators)!: resolution in visual clustering
ChristianBeilschmidt Aug 20, 2025
8506810
fix(operators): resolution in visual clustering (#1073)
jdroenner Aug 21, 2025
d0272c3
flip QueryProcessor impl for RasterQueryProcessor to RasterQueryProce…
jdroenner Sep 4, 2025
fcee04a
time filler part 1
jdroenner Oct 6, 2025
657f51f
reading overview levels from multi tiles
michaelmattig Oct 20, 2025
54d4554
clean up code
michaelmattig Oct 20, 2025
896cffa
refactor read advise calculation
michaelmattig Oct 20, 2025
7d4d94f
finalize TimeDescriptor and time_query
jdroenner Oct 24, 2025
b0f90b1
fmt
jdroenner Oct 24, 2025
81c74b9
fluff1
jdroenner Oct 24, 2025
801d051
fluff2
jdroenner Oct 24, 2025
c91a1eb
fix time dimension of test dataset
jdroenner Oct 24, 2025
1b7e860
vector reprojection optimization
michaelmattig Oct 24, 2025
2f2fc88
remove skipping no-data tiles in GdalSource, add wms return empty til…
jdroenner Oct 28, 2025
cbfbbcd
reinitialize workflow to fix operator path
michaelmattig Oct 29, 2025
e370339
some cleanup
jdroenner Oct 29, 2025
13c25a7
validate tile compatibility
michaelmattig Oct 29, 2025
a5d9dd9
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Oct 30, 2025
3d9be48
produce warning in rasterisation operator
jdroenner Oct 30, 2025
98eab5c
check tile validity on insert and perform batches
michaelmattig Oct 30, 2025
4635957
Merge branch 'new-pixel-based-queries-rebase' of https://github.com/g…
michaelmattig Oct 31, 2025
8a70541
clippy
michaelmattig Oct 31, 2025
e25b0a4
use time gap filler and fix gap filling for regular time series in da…
michaelmattig Nov 3, 2025
e565555
revert default buffer size
michaelmattig Nov 3, 2025
77914ae
implement time_query for new gdal source
michaelmattig Nov 3, 2025
577088d
cargo fmt
michaelmattig Nov 4, 2025
dd02530
add default time_query impl for regular time
jdroenner Nov 4, 2025
2b063d7
force example
michaelmattig Nov 4, 2025
f2a2b4d
Merge branch 'new-pixel-based-queries-rebase' of https://github.com/g…
michaelmattig Nov 4, 2025
615d428
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Nov 6, 2025
113de40
update clippy fix
jdroenner Nov 6, 2025
f0e6b64
check TiimeStep to be > 0
jdroenner Nov 6, 2025
4da278d
update dataset extend when inserting new tiles
michaelmattig Nov 6, 2025
f759cd1
check tile alignment before insertion
michaelmattig Nov 6, 2025
3c666dd
refactor clippy
michaelmattig Nov 6, 2025
f0dfa16
clippy
michaelmattig Nov 6, 2025
b0d2f15
Merge branch 'new-pixel-based-queries-rebase' of https://github.com/g…
michaelmattig Nov 6, 2025
287fd2a
fix errors introduced while fixing lints
michaelmattig Nov 6, 2025
56a3fb6
sqlfluff
michaelmattig Nov 6, 2025
f1e9da6
layer collection for tile import
michaelmattig Nov 7, 2025
44ecb3a
add id to tiles
michaelmattig Nov 10, 2025
e25556b
make file paths relative to volume
michaelmattig Nov 14, 2025
099e8ab
turn example into cli
michaelmattig Nov 17, 2025
8dc407b
clippy
michaelmattig Nov 17, 2025
7089d72
add remote data dir to cli params
michaelmattig Nov 17, 2025
6d6b9bf
Merge branch 'new-pixel-based-queries-rebase' of https://github.com/g…
michaelmattig Nov 17, 2025
c3ef767
fix test
michaelmattig Nov 17, 2025
efa44e3
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Nov 19, 2025
43d93ab
adjust openapi
michaelmattig Nov 20, 2025
101bcb1
remove empty lines
jdroenner Nov 20, 2025
fe0f909
update openapi.json
michaelmattig Nov 20, 2025
ba34db9
change time dimension repr in openapi
jdroenner Nov 20, 2025
bbfcee7
Merge branch 'new-pixel-based-queries-rebase' of https://github.com/g…
michaelmattig Nov 20, 2025
49b049e
fix time descriptor
michaelmattig Nov 20, 2025
5dc8f9b
Merge branch 'new-pixel-based-queries-rebase' of https://github.com/g…
michaelmattig Nov 21, 2025
477233d
fix wfs open api spec
michaelmattig Nov 24, 2025
3cbf6fd
fix wms/wcs
michaelmattig Nov 25, 2025
ac184a1
clippy
michaelmattig Nov 25, 2025
dc3d292
change deserialization of ogc queries
michaelmattig Nov 25, 2025
c50d965
remove query resolution form wfs
michaelmattig Nov 25, 2025
54b608b
fix ogc openapi schema
michaelmattig Nov 25, 2025
8c0dc0c
fix ogc open api spec (#1096)
jdroenner Nov 26, 2025
99b00d9
fix schemas
michaelmattig Nov 26, 2025
cc2967c
cargo fmt
michaelmattig Nov 26, 2025
40043c8
remove redundant type
michaelmattig Nov 26, 2025
831c08c
fix: ogx schemas (#1097)
jdroenner Nov 27, 2025
f0a1ec6
Merge branch 'main' of github.com:geo-engine/geoengine into new-pixel…
jdroenner Nov 27, 2025
aa67a3c
fix import lost in merge
jdroenner Nov 28, 2025
074866a
more helpfull debug output
jdroenner Dec 15, 2025
d958cbf
more helpful debug output
jdroenner Dec 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 12 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exclude = [
resolver = "2"

[workspace.package]
version = "0.8.0"
version = "0.9.0"
authors = [
"Christian Beilschmidt <[email protected]>",
"Johannes Drönner <[email protected]>",
Expand Down Expand Up @@ -156,6 +156,7 @@ pwhash = "1.0"
quote = "1.0"
rand = "0.9"
rayon = "1.8"
regex = "1.11"
reqwest = { version = "0.12", features = [
"json",
"multipart",
Expand Down
2 changes: 0 additions & 2 deletions Settings-default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ password = "geoengine"
clear_database_on_start = false

[raster.tiling_specification]
origin_coordinate_x = 0.0
origin_coordinate_y = 0.0
tile_shape_pixels_x = 512
tile_shape_pixels_y = 512

Expand Down
2 changes: 0 additions & 2 deletions Settings-test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ password = "geoengine"
raster_data_root_path = "../test_data/raster" # relative to sub crate directory for tests

[raster.tiling_specification]
origin_coordinate_x = 0.0
origin_coordinate_y = 0.0
tile_shape_pixels_x = 512
tile_shape_pixels_y = 512

Expand Down
1 change: 1 addition & 0 deletions datatypes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ arrow-schema = { workspace = true }
bytes = { workspace = true }
chrono = { workspace = true }
fallible-iterator = { workspace = true }
futures = { workspace = true }
float-cmp = { workspace = true }
gdal = { workspace = true }
geo = { workspace = true }
Expand Down
14 changes: 13 additions & 1 deletion datatypes/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ pub enum Error {
i2: TimeInterval,
},

#[snafu(display("Time step must be greater than zero, got: {}", step))]
TimeStepStepMustBeGreaterThanZero {
step: u32,
},

#[snafu(display(
"{} must be larger than {} and {} must be smaller than {}",
start.inner(),
Expand Down Expand Up @@ -294,7 +299,7 @@ pub enum Error {
WrongMetadataType,

#[snafu(display(
"The conditions ul.x < lr.x && ul.y < lr.y are not met by ul:{} lr:{}",
"The conditions ul.x < lr.x && ul.y > lr.y are not met by ul:{} lr:{}",
upper_left_coordinate,
lower_right_coordinate
))]
Expand Down Expand Up @@ -345,6 +350,8 @@ pub enum Error {
DuplicateBandInQueryBandSelection,
QueryBandSelectionMustNotBeEmpty,

TilingGeoTransformOriginCoordinateMismatch,
TilingGeoTransformResolutionMissmatch,
#[snafu(display("Invalid number of suffixes, expected {} found {}", expected, found))]
InvalidNumberOfSuffixes {
expected: usize,
Expand All @@ -363,6 +370,11 @@ pub enum Error {
expected: usize,
found: usize,
},
NoIntersectionWithTargetProjection {
srs_in: SpatialReference,
srs_out: SpatialReference,
bounds: BoundingBox2D,
},
}

impl From<arrow::error::ArrowError> for Error {
Expand Down
10 changes: 10 additions & 0 deletions datatypes/src/operations/image/colorizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ impl From<Colorizer> for RasterColorizer {
}
}

impl RasterColorizer {
/// Returns the no data color of this raster colorizer
pub fn no_data_color(&self) -> RgbaColor {
match self {
RasterColorizer::SingleBand { band_colorizer, .. } => band_colorizer.no_data_color(),
RasterColorizer::MultiBand { rgb_params, .. } => rgb_params.no_data_color,
}
}
}

/// The parameters for the RGBA colorizer
#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq)]
#[serde(rename_all = "camelCase")]
Expand Down
2 changes: 1 addition & 1 deletion datatypes/src/operations/image/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ pub use colorizer::{
};
pub use into_lossy::LossyInto;
pub use rgba_transmutable::RgbaTransmutable;
pub use to_png::ToPng;
pub use to_png::{ToPng, create_empty_no_data_color_png_bytes};
13 changes: 10 additions & 3 deletions datatypes/src/operations/image/to_png.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ pub trait ToPng {
) -> Result<Vec<u8>>;
}

pub fn create_empty_no_data_color_png_bytes(
width: u32,
height: u32,
no_data_color: RgbaColor,
) -> Result<Vec<u8>> {
let image_buffer = ImageBuffer::from_pixel(width, height, no_data_color.into());
image_buffer_to_png_bytes(image_buffer)
}

fn image_buffer_to_png_bytes(
image_buffer: ImageBuffer<image::Rgba<u8>, Vec<u8>>,
) -> Result<Vec<u8>> {
Expand Down Expand Up @@ -121,9 +130,7 @@ where
) -> Result<Vec<u8>> {
// TODO: use PNG color palette once it is available

let image_buffer = ImageBuffer::from_pixel(width, height, no_data_color.into());

image_buffer_to_png_bytes(image_buffer)
create_empty_no_data_color_png_bytes(width, height, no_data_color)
}
}

Expand Down
Loading
Loading