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/wms_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ type Layer struct {
// +kubebuilder:validation:Pattern:=`^[1-9][0-9]*(.[0-9]+)?$`
MaxScaleDenominator *string `json:"maxscaledenominator,omitempty"`

// The column where the data needs to get filtered
FilterColumn *string `json:"filterColumn,omitempty"`

// The value where the data needs to get filtered
FilterValue *string `json:"filterValue,omitempty"`

// List of styles used by the layer
// +kubebuilder:validation:MinItems:=1
Styles []Style `json:"styles,omitempty"`
Expand Down
10 changes: 10 additions & 0 deletions api/v3/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,16 @@ func (in *Layer) DeepCopyInto(out *Layer) {
*out = new(string)
**out = **in
}
if in.FilterColumn != nil {
in, out := &in.FilterColumn, &out.FilterColumn
*out = new(string)
**out = **in
}
if in.FilterValue != nil {
in, out := &in.FilterValue, &out.FilterValue
*out = new(string)
**out = **in
}
if in.Styles != nil {
in, out := &in.Styles, &out.Styles
*out = make([]Style, len(*in))
Expand Down
18 changes: 18 additions & 0 deletions config/crd/bases/pdok.nl_wms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,12 @@ spec:
x-kubernetes-validations:
- message: metadataUrl should have exactly 1 of csw or custom
rule: (has(self.csw) || has(self.custom)) && !(has(self.csw) && has(self.custom))
filterColumn:
description: The column where the data needs to get filtered
type: string
filterValue:
description: The value where the data needs to get filtered
type: string
keywords:
description: Keywords of the layer, required if the layer is visible
items:
Expand Down Expand Up @@ -1120,6 +1126,12 @@ spec:
x-kubernetes-validations:
- message: metadataUrl should have exactly 1 of csw or custom
rule: (has(self.csw) || has(self.custom)) && !(has(self.csw) && has(self.custom))
filterColumn:
description: The column where the data needs to get filtered
type: string
filterValue:
description: The value where the data needs to get filtered
type: string
keywords:
description: Keywords of the layer, required if the layer is visible
items:
Expand Down Expand Up @@ -1332,6 +1344,12 @@ spec:
x-kubernetes-validations:
- message: metadataUrl should have exactly 1 of csw or custom
rule: (has(self.csw) || has(self.custom)) && !(has(self.csw) && has(self.custom))
filterColumn:
description: The column where the data needs to get filtered
type: string
filterValue:
description: The value where the data needs to get filtered
type: string
keywords:
description: Keywords of the layer, required if the layer is visible
items:
Expand Down
2 changes: 2 additions & 0 deletions internal/controller/mapfilegenerator/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ func getWMSLayer(serviceLayer pdoknlv3.Layer, serviceExtent string, wms *pdoknlv
Postgis: nil,
MinScale: serviceLayer.MinScaleDenominator,
MaxScale: serviceLayer.MaxScaleDenominator,
FilterColumn: serviceLayer.FilterColumn,
FilterValue: serviceLayer.FilterValue,
LabelNoClip: serviceLayer.LabelNoClip,
},
GroupName: groupName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@
"keywords": "Hydroobject,Waterbody,Watercourse,River,Stream,Lake,Reservoir",
"layer_extent": "-59188.44333693248 304984.64144318487 308126.88473339565 858328.516489961",
"maxscale": "50000",
"minscale": "1",
"minscale": "2",
"filtercolumn": "gml_id",
Comment thread
Robbert2407 marked this conversation as resolved.
"filtervalue": "1",
"name": "HY.PhysicalWaters.Waterbodies",
"styles": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ spec:
- Lake
- Reservoir
maxscaledenominator: "50000"
minscaledenominator: "1"
minscaledenominator: "2"
filter_column: "gml_id"
filter_value: "1"
name: HY.PhysicalWaters.Waterbodies
styles:
- name: HY.PhysicalWaters.Waterbodies.Default
Expand Down
2 changes: 2 additions & 0 deletions internal/controller/mapfilegenerator/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ type BaseLayer struct {
Postgis *bool `json:"postgis,omitempty"`
MinScale *string `json:"minscale,omitempty"`
MaxScale *string `json:"maxscale,omitempty"`
FilterColumn *string `json:"filter_column,omitempty"`
FilterValue *string `json:"filter_value,omitempty"`
TifPath *string `json:"tif_path,omitempty"`
Resample *string `json:"resample,omitempty"`
OversampleRatio *string `json:"oversample_ratio,omitempty"`
Expand Down
Loading