-
Notifications
You must be signed in to change notification settings - Fork 1
wms_rdc
The configuration below describes examples for WMTS layers from the PDOK. Often the container wmts_layer and it's subitems are configured in a separate dms file and included in a Geography container.
The example presents how a coordinate system is configured, with as base unit: point_rd_base. The DialogData for this unit need to refer to the container in which a WMS layer is configured. This container need to contain a target parameter, used to make the relevant requests to the WMTS server.
unit<fpoint> point_rd_base
: DialogData = "wmts_layer"
, Format = "EPSG:28992";
unit<fpoint> point_rd := range(point_rd_base, point(300000[m],0[m]), point(625000[m],280000[m]));
container wmts_layer
{
parameter <uint32> nr_att := 8;
parameter <uint32> nr_row := 15;
unit<uint32> TileMatrixEl := range(uint32, 0, nr_att * nr_row)
{
attribute<string> values:
//name , ScaleDen , Top , Left ,Width ,Height , MatrixWidth, MatrixHeight</span>
[
'EPSG:28992:0' ,'12288000' ,'-285401.92', '903402.0', '256' ,'256' , '1' , '1'
,'EPSG:28992:1' , '6144000' ,'-285401.92', '903402.0', '256' ,'256' , '2' , '2'
,'EPSG:28992:2' , '3072000' ,'-285401.92', '903402.0', '256' ,'256' , '4' , '4'
,'EPSG:28992:3' , '1536000' ,'-285401.92', '903402.0', '256' ,'256' , '8' , '8'
,'EPSG:28992:4' , '768000' ,'-285401.92', '903402.0', '256' ,'256' , '16' , '16'
,'EPSG:28992:5' , '384000' ,'-285401.92', '903402.0', '256' ,'256' , '32' , '32'
,'EPSG:28992:6' , '192000' ,'-285401.92', '903402.0', '256' ,'256' , '64' , '64'
,'EPSG:28992:7' , '96000' ,'-285401.92', '903402.0', '256' ,'256' , '128' , '128'
,'EPSG:28992:8' , '48000' ,'-285401.92', '903402.0', '256' ,'256' , '256' , '256'
,'EPSG:28992:9' , '24000' ,'-285401.92', '903402.0', '256' ,'256' , '512' , '512'
,'EPSG:28992:10', '12000' ,'-285401.92', '903402.0', '256' ,'256' , '1024' , '1024'
,'EPSG:28992:11', '6000' ,'-285401.92', '903402.0', '256' ,'256' , '2048' , '2048'
,'EPSG:28992:12', '3000' ,'-285401.92', '903402.0', '256' ,'256' , '4096' , '4096'
,'EPSG:28992:13', '1500' ,'-285401.92', '903402.0', '256' ,'256' , '8192' , '8192'
,'EPSG:28992:14', '750' ,'-285401.92', '903402.0', '256' ,'256' ,'16384' ,'16384'
] ;
}
unit<uint32> TileMatrix := range(uint32, 0, nr_row)
{
attribute<.> id := id(.);
attribute<string> name := TileMatrixEl/values[value(id * nr_att + 0, TileMatrixEl)];
attribute<float64> ScaleDenominator := float64(TileMatrixEl/values[value(id * nr_att + 1, TileMatrixEl)]);
attribute<float64> LeftCoord := float64(TileMatrixEl/values[value(id * nr_att + 2, TileMatrixEl)]);
attribute<float64> TopCoord := float64(TileMatrixEl/values[value(id * nr_att + 3, TileMatrixEl)]);
attribute<uint16> TileWidth := uint16(TileMatrixEl/values[value(id * nr_att + 4, TileMatrixEl)]);
attribute<uint16> TileHeight := uint16(TileMatrixEl/values[value(id * nr_att + 5, TileMatrixEl)]);
attribute<uint32> MatrixWidth := uint32(TileMatrixEl/values[value(id * nr_att + 6, TileMatrixEl)]);
attribute<uint32> MatrixHeight := uint32(TileMatrixEl/values[value(id * nr_att + 7, TileMatrixEl)]);
}
// Different examples of tested layers </span>
parameter<string> layer := 'grijs';
// parameter<string> layer := 'pastel'; </span>
// parameter<string> layer := 'standaard'; </span>
// parameter<string> layer := 'water'; </span>
// parameter<string> layer := 'Actueel_ortho25'; </span>
// parameter<string> image_format := 'jpeg'; </span>
parameter<string> image_format := 'png8';
parameter<string> host := 'service.pdok.nl';
parameter<string> target := '/brt/achtergrondkaart/wmts/v2_0'
'?SERVICE=WMTS'
'&REQUEST=GetTile'
'&VERSION=1.0.0'
'&LAYER=' + layer +
'&TILEMATRIXSET=EPSG:28992'
'&TILEMATRIX=@TM@'
'&TILEROW=@TR@'
'&TILECOL=@TC@'
'&FORMAT=image/'+image_format
;
}
In this example the brtachtergrondkaart layer: grijs is used as background layer, but other layers can be selected by (un)commenting other layer lines.
If the layer serves .png files, no image_format needs to be configured. If the layer serves .jpeg files (often used for photo's), such as Actueel_ortho25, uncomment also the image_format = 'jpeg' configuration rule.
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.