Skip to content

Commit

Permalink
separated sk/pl shading and masked out other relief features
Browse files Browse the repository at this point in the history
  • Loading branch information
zdila committed Jul 26, 2022
1 parent f077c1b commit ce84040
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 2 additions & 0 deletions shading-scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ build/final.tif.ovr: build/final.tif
# gdaldem hillshade -alg Horn -z 1.5 -co JPEG_QUALITY=95 -co COMPRESS=JPEG -co NUM_THREADS=24 -co TILED=YES -co BIGTIFF=YES pl-warped.tif pl-hs.tif
# gdalbuildvrt sh.vrt -r nearest pl-hs.tif sk-hs.tif
# gdal2tiles.py -r near -z 17 --xyz --processes=$(getconf _NPROCESSORS_ONLN) -n -w none sh.vrt sh
# find -type d | parallel -j 24 mogrify -format jpg '{}/*.png'


# SI:
Expand All @@ -306,3 +307,4 @@ wget -i ./slovenia/urls
pdal pipeline ./slovenia/pdal_dtm.json
whitebox_tools -r=FeaturePreservingSmoothing --dem=GK_535_153_filled.tif --num_iter=3 --norm_diff=30 --filter=11 -o=./GK_535_153_smooth.tif --wd=.
python /usr/lib/python3/dist-packages/osgeo_utils/gdal_edit.py -a_srs EPSG:3794 GK_535_153_filled.tif

12 changes: 6 additions & 6 deletions style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,17 +353,17 @@ function generateFreemapStyle({
.lineSymbolizer({ stroke: colors.areaLabel, strokeWidth: 1 })
.typesRule(14, 'earth_bank')
.linePatternSymbolizer({ file: 'images/earth_bank.svg' })
.style('feature_lines')
.typesRule(16, 'weir')
.lineSymbolizer({ stroke: hsl(0, 0, 40), strokeWidth: 3, strokeDasharray: '9, 3' })
.typesRule(16, 'dam')
.lineSymbolizer({ stroke: hsl(0, 0, 40), strokeWidth: 3 })
.typesRule(16, 'dyke')
.linePatternSymbolizer({ file: 'images/dyke.svg' })
.typesRule(16, 'embankment')
.linePatternSymbolizer({ file: 'images/embankment-half.svg' })
.typesRule(16, 'gully')
.linePatternSymbolizer({ file: 'images/gully.svg' })
.style('feature_lines')
.typesRule(16, 'weir')
.lineSymbolizer({ stroke: hsl(0, 0, 40), strokeWidth: 3, strokeDasharray: '9, 3' })
.typesRule(16, 'dam')
.lineSymbolizer({ stroke: hsl(0, 0, 40), strokeWidth: 3 })
.typesRule(13, 'line')
.lineSymbolizer({ stroke: 'black', strokeWidth: 1, strokeOpacity: 0.5 })
.typesRule(14, 'minor_line')
Expand All @@ -376,7 +376,7 @@ function generateFreemapStyle({
})
.style('embankments')
.rule({})
.linePatternSymbolizer({ file: 'images/embankment.svg' })
.linePatternSymbolizer({ file: 'images/embankment.svg' }) // TODO don't render on hi-res hillshading
.style('mask') // hillshading helper for mask
.rule()
.rasterSymbolizer({ scaling: 'bilinear', opacity: 1.00 })
Expand Down
13 changes: 12 additions & 1 deletion style/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,15 @@ function layers(shading, contours, hikingTrails, bicycleTrails, skiTrails, horse
{ compOp: 'dst-out' },
);

layer(
'mask',
{
type: 'gdal',
file: 'shading/pl/mask.tif',
},
{ compOp: 'dst-out' },
);

// AT / CH is not so detailed
// layer(
// 'mask',
Expand Down Expand Up @@ -614,6 +623,8 @@ function layers(shading, contours, hikingTrails, bicycleTrails, skiTrails, horse

addShadingAndContours('si', []);

addShadingAndContours('pl', ['sk']);

addShadingAndContours('sk', []);

map.layer(
Expand All @@ -626,7 +637,7 @@ function layers(shading, contours, hikingTrails, bicycleTrails, skiTrails, horse
({ layer }) => {
// to cut out detailed

for (const cc of ['it', 'at', 'ch', 'si', 'sk']) {
for (const cc of ['it', 'at', 'ch', 'si', 'pl', 'sk']) {
layer(
'mask',
{
Expand Down

0 comments on commit ce84040

Please sign in to comment.