Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions generation/inputs/mergeNtiff/colorize.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"identifier": "white_to_alpha",
"title": "Blanc transparent",
"abstract": "Rend le blanc transparent",
"keywords": ["white", "alpha"],
"legend": {
"format": "image/png",
"url": "http://ign.fr",
"height": 100,
"width": 100,
"min_scale_denominator": 0,
"max_scale_denominator": 30
},
"colorize": {
"source": [255,255,255],
"destination": [255,255,255,0],
"tolerance": 2
}
}
5 changes: 5 additions & 0 deletions generation/suite/mergeNtiff.bats
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ setup_file() {
run -255 mergeNtiff -f ../inputs/mergeNtiff/conf_style.txt -p ../inputs/mergeNtiff/terrainrgb_with_palette.json -c zip -i lanczos -n -255,0,0,100
}

@test "Succeed to reproject images and apply a colorize style " {
bats_require_minimum_version 1.5.0
run -255 mergeNtiff -f ../inputs/mergeNtiff/conf_style.txt -p ../inputs/mergeNtiff/colorize.json -c zip -i lanczos -n -255,0,0,100
}

teardown_file() {
rm -f /tmp/test_ok_style.tif
rm -f /tmp/test_ok_mask_i.tif
Expand Down
17 changes: 17 additions & 0 deletions server/bruno/05_wms/02_getmap/bdortho/ok-png-colorize-4559.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
meta {
name: OK (3857 + GEOTIFF DEFLATE)
type: http
seq: 1
}

get {
url: {{endpoint}}/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-6818182.923037664965,1616796.022287987173,-6764371.25512490049,1680391.629821252078&CRS=EPSG:3857&WIDTH=691&HEIGHT=815&LAYERS=bdortho&STYLES=colorize&FORMAT=image/png
body: none
auth: none
}

assert {
res.status: eq 200
res.headers["content-type"]: eq image/geotiff
res.headers["content-disposition"]: eq filename="image.tif"
}