Skip to content
Merged
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
6 changes: 6 additions & 0 deletions api/v3/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ type TIF struct {
// +kubebuilder:default=NEAREST
Resample string `json:"resample,omitempty"`

// Controls the smoothing of the image on a certain point. Bigger value gives a smoother/better picture but
// results in slower web responses, optional
// +kubebuilder:validation:Pattern="^-?[0-9]+([.][0-9]*)?$"
// +kubebuilder:default="2.5"
OversampleRatio string `json:"oversampleRatio,omitempty"`

// Sets the color index to treat as transparent for raster layers, optional, hex or rgb
// +kubebuilder:validation:Pattern=`(#[0-9A-F]{6}([0-9A-F]{2})?)|([0-9]{1,3}\s[0-9]{1,3}\s[0-9]{1,3})`
Offsite *string `json:"offsite,omitempty"`
Expand Down
14 changes: 14 additions & 0 deletions config/crd/bases/pdok.nl_wms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,13 @@ spec:
description: Sets the color index to treat as transparent for raster layers, optional, hex or rgb
pattern: (#[0-9A-F]{6}([0-9A-F]{2})?)|([0-9]{1,3}\s[0-9]{1,3}\s[0-9]{1,3})
type: string
oversampleRatio:
default: "2.5"
description: |-
Controls the smoothing of the image on a certain point. Bigger value gives a smoother/better picture but
results in slower web responses, optional
pattern: ^-?[0-9]+([.][0-9]*)?$
type: string
resample:
default: NEAREST
description: This option can be used to control the resampling kernel used sampling raster images, optional
Expand Down Expand Up @@ -1275,6 +1282,13 @@ spec:
description: Sets the color index to treat as transparent for raster layers, optional, hex or rgb
pattern: (#[0-9A-F]{6}([0-9A-F]{2})?)|([0-9]{1,3}\s[0-9]{1,3}\s[0-9]{1,3})
type: string
oversampleRatio:
default: "2.5"
description: |-
Controls the smoothing of the image on a certain point. Bigger value gives a smoother/better picture but
results in slower web responses, optional
pattern: ^-?[0-9]+([.][0-9]*)?$
type: string
resample:
default: NEAREST
description: This option can be used to control the resampling kernel used sampling raster images, optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"name": "luchtfotoroads_100pixkm",
"offsite": "#978E97",
"resample": "BILINEAR",
"oversample_ratio": "1",
"styles": [
{
"path": "/styling/roads.style",
Expand All @@ -61,6 +62,7 @@
"name": "luchtfotoroads_200pixkm",
"offsite": "#978E97",
"resample": "BILINEAR",
"oversample_ratio": "2.0",
"styles": [
{
"path": "/styling/roads.style",
Expand All @@ -84,6 +86,7 @@
"name": "luchtfotoroads_400pixkm",
"offsite": "#978E97",
"resample": "BILINEAR",
"oversample_ratio": "2.5",
"styles": [
{
"path": "/styling/roads.style",
Expand All @@ -107,6 +110,7 @@
"name": "luchtfotoroads_800pixkm",
"offsite": "#978E97",
"resample": "BILINEAR",
"oversample_ratio": "1",
"styles": [
{
"path": "/styling/roads.style",
Expand All @@ -130,6 +134,7 @@
"name": "luchtfotoroads_1600pixkm",
"offsite": "#978E97",
"resample": "BILINEAR",
"oversample_ratio": "1",
"styles": [
{
"path": "/styling/roads.style",
Expand All @@ -153,6 +158,7 @@
"name": "luchtfotolabels_100pixkm",
"offsite": "#978E97",
"resample": "BILINEAR",
"oversample_ratio": "1",
"styles": [
{
"path": "/styling/labels.style",
Expand All @@ -176,6 +182,7 @@
"name": "luchtfotolabels_200pixkm",
"offsite": "#978E97",
"resample": "BILINEAR",
"oversample_ratio": "1",
"styles": [
{
"path": "/styling/labels.style",
Expand All @@ -199,6 +206,7 @@
"name": "luchtfotolabels_400pixkm",
"offsite": "#978E97",
"resample": "BILINEAR",
"oversample_ratio": "1",
"styles": [
{
"path": "/styling/labels.style",
Expand All @@ -222,6 +230,7 @@
"name": "luchtfotolabels_800pixkm",
"offsite": "#978E97",
"resample": "BILINEAR",
"oversample_ratio": "1",
"styles": [
{
"path": "/styling/labels.style",
Expand All @@ -245,6 +254,7 @@
"name": "luchtfotolabels_1600pixkm",
"offsite": "#978E97",
"resample": "BILINEAR",
"oversample_ratio": "1",
"styles": [
{
"path": "/styling/labels.style",
Expand All @@ -267,6 +277,7 @@
"name": "luchtfotolabels_3200pixkm",
"offsite": "#978E97",
"resample": "BILINEAR",
"oversample_ratio": "1",
"styles": [
{
"path": "/styling/labels.style",
Expand Down
11 changes: 11 additions & 0 deletions internal/controller/mapfilegenerator/test_data/input/wms_tif.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ spec:
blobKey: tifs/bzk/luchtfotolabels/${GPKG_VERSION}/100pixkm_luforoads/100pixkm_luforoads.vrt
offsite: '#978E97'
resample: BILINEAR
oversampleRatio: "1"
datasetMetadataUrl:
csw:
metadataIdentifier: 6ca22f53-b072-42f4-b920-104c7c83cd28
Expand All @@ -159,6 +160,7 @@ spec:
blobKey: tifs/bzk/luchtfotolabels/${GPKG_VERSION}/200pixkm_luforoads/200pixkm_luforoads.vrt
offsite: '#978E97'
resample: BILINEAR
oversampleRatio: "2.0"
datasetMetadataUrl:
csw:
metadataIdentifier: 6ca22f53-b072-42f4-b920-104c7c83cd28
Expand All @@ -185,6 +187,7 @@ spec:
blobKey: tifs/bzk/luchtfotolabels/${GPKG_VERSION}/400pixkm_luforoads/400pixkm_luforoads.vrt
offsite: '#978E97'
resample: BILINEAR
oversampleRatio: "2.5"
datasetMetadataUrl:
csw:
metadataIdentifier: 6ca22f53-b072-42f4-b920-104c7c83cd28
Expand All @@ -211,6 +214,7 @@ spec:
blobKey: tifs/bzk/luchtfotolabels/${GPKG_VERSION}/800pixkm_luforoads/800pixkm_luforoads.vrt
offsite: '#978E97'
resample: BILINEAR
oversampleRatio: "1"
datasetMetadataUrl:
csw:
metadataIdentifier: 6ca22f53-b072-42f4-b920-104c7c83cd28
Expand All @@ -237,6 +241,7 @@ spec:
blobKey: tifs/bzk/luchtfotolabels/${GPKG_VERSION}/1600pixkm_luforoads/1600pixkm_luforoads.vrt
offsite: '#978E97'
resample: BILINEAR
oversampleRatio: "1"
datasetMetadataUrl:
csw:
metadataIdentifier: 6ca22f53-b072-42f4-b920-104c7c83cd28
Expand All @@ -263,6 +268,7 @@ spec:
blobKey: tifs/bzk/luchtfotolabels/${GPKG_VERSION}/100pixkm_lufolabels/100pixkm_lufolabels.vrt
offsite: '#978E97'
resample: BILINEAR
oversampleRatio: "1"
datasetMetadataUrl:
csw:
metadataIdentifier: 6ca22f53-b072-42f4-b920-104c7c83cd28
Expand All @@ -289,6 +295,7 @@ spec:
blobKey: tifs/bzk/luchtfotolabels/${GPKG_VERSION}/200pixkm_lufolabels/200pixkm_lufolabels.vrt
offsite: '#978E97'
resample: BILINEAR
oversampleRatio: "1"
datasetMetadataUrl:
csw:
metadataIdentifier: 6ca22f53-b072-42f4-b920-104c7c83cd28
Expand All @@ -315,6 +322,7 @@ spec:
blobKey: tifs/bzk/luchtfotolabels/${GPKG_VERSION}/400pixkm_lufolabels/400pixkm_lufolabels.vrt
offsite: '#978E97'
resample: BILINEAR
oversampleRatio: "1"
datasetMetadataUrl:
csw:
metadataIdentifier: 6ca22f53-b072-42f4-b920-104c7c83cd28
Expand All @@ -341,6 +349,7 @@ spec:
blobKey: tifs/bzk/luchtfotolabels/${GPKG_VERSION}/800pixkm_lufolabels/800pixkm_lufolabels.vrt
offsite: '#978E97'
resample: BILINEAR
oversampleRatio: "1"
datasetMetadataUrl:
csw:
metadataIdentifier: 6ca22f53-b072-42f4-b920-104c7c83cd28
Expand All @@ -367,6 +376,7 @@ spec:
blobKey: tifs/bzk/luchtfotolabels/${GPKG_VERSION}/1600pixkm_lufolabels/1600pixkm_lufolabels.vrt
offsite: '#978E97'
resample: BILINEAR
oversampleRatio: "1"
datasetMetadataUrl:
csw:
metadataIdentifier: 6ca22f53-b072-42f4-b920-104c7c83cd28
Expand All @@ -393,6 +403,7 @@ spec:
blobKey: tifs/bzk/luchtfotolabels/${GPKG_VERSION}/3200pixkm_lufolabels/3200pixkm_lufolabels.vrt
offsite: '#978E97'
resample: BILINEAR
oversampleRatio: "1"
datasetMetadataUrl:
csw:
metadataIdentifier: 6ca22f53-b072-42f4-b920-104c7c83cd28
Expand Down
34 changes: 18 additions & 16 deletions internal/controller/mapfilegenerator/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,23 @@ type WMSInput struct {

//nolint:tagliatelle
type BaseLayer struct {
Name string `json:"name"`
Title string `json:"title"`
Abstract string `json:"abstract"`
Keywords string `json:"keywords"`
Extent string `json:"layer_extent"`
MetadataID string `json:"dataset_metadata_id"`
Columns []Column `json:"columns,omitempty"`
GeometryType *string `json:"geometry_type,omitempty"`
GeopackagePath *string `json:"gpkg_path,omitempty"`
TableName *string `json:"tablename,omitempty"`
Postgis *bool `json:"postgis,omitempty"`
MinScale *string `json:"minscale,omitempty"`
MaxScale *string `json:"maxscale,omitempty"`
TifPath *string `json:"tif_path,omitempty"`
Resample *string `json:"resample,omitempty"`
LabelNoClip bool `json:"label_no_clip,omitempty"`
Name string `json:"name"`
Title string `json:"title"`
Abstract string `json:"abstract"`
Keywords string `json:"keywords"`
Extent string `json:"layer_extent"`
MetadataID string `json:"dataset_metadata_id"`
Columns []Column `json:"columns,omitempty"`
GeometryType *string `json:"geometry_type,omitempty"`
GeopackagePath *string `json:"gpkg_path,omitempty"`
TableName *string `json:"tablename,omitempty"`
Postgis *bool `json:"postgis,omitempty"`
MinScale *string `json:"minscale,omitempty"`
MaxScale *string `json:"maxscale,omitempty"`
TifPath *string `json:"tif_path,omitempty"`
Resample *string `json:"resample,omitempty"`
OversampleRatio *string `json:"oversample_ratio,omitempty"`
LabelNoClip bool `json:"label_no_clip,omitempty"`
}

type WFSLayer struct {
Expand Down Expand Up @@ -124,6 +125,7 @@ func SetDataFields[O pdoknlv3.WMSWFS](obj O, wmsLayer *WMSLayer, data pdoknlv3.D
wmsLayer.BaseLayer.TifPath = smoothoperatorutils.Pointer(path.Join("/vsiaz", reReplace.ReplaceAllString(tif.BlobKey, "")))
}
wmsLayer.BaseLayer.Resample = &tif.Resample
wmsLayer.BaseLayer.OversampleRatio = &tif.OversampleRatio
wmsLayer.Offsite = smoothoperatorutils.PointerVal(tif.Offsite, "")
wmsLayer.GetFeatureInfoIncludesClass = &tif.GetFeatureInfoIncludesClass
case data.Postgis != nil:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ metadata:
service-type: wms
service-version: v1_0
theme: '2016'
name: complete-wms-mapfile-generator-b4bbcf5kdk
name: complete-wms-mapfile-generator-gh2fg6ccm9
namespace: default
ownerReferences:
- apiVersion: pdok.nl/v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ spec:
defaultMode: 420
name: capabilities-generator-config
- configMap:
name: complete-wms-mapfile-generator-b4bbcf5kdk
name: complete-wms-mapfile-generator-gh2fg6ccm9
defaultMode: 420
name: mapfile-generator-config
- name: styling-files
Expand Down
Loading