Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# palette_reclass.sh
# Lars Schylberg, 2020-01-03
#
# example how to reclass a tif palette image with gdal_calc
# and some glue with awk and sed
#
# land 59,89,95,255 and / or 60,89,96,255 ---> 1
@LarsSchy
LarsSchy / style_test.map
Created September 15, 2020 08:29
Example how to set up named styles in Mapserver
MAP
# Style test mapfile, how to set up named styles in mapserver
#
# Lars Schylberg, 2020-09-15
#
# example: root layers access: LAYERS=ST&styles=color&
# individual layers: LAYERS=square,circle&styles=green,grey&
# default: LAYERS=ST&styles=&
# or LAYERS=ST&styles=default&
# Gives correct GetCapabilities response
@LarsSchy
LarsSchy / test_swedish_text.sh
Created January 28, 2021 19:43
Test case for mappyfile validate
#!/bin/bash
#
# test_swedish_text.sh
# Lars Schylberg, 2021-01-28
#
# test Swedish 250K texts with attributes for FONT [FONTNAME], POSITION [MSPOS],
# also COLOR [TXTCLR] AND OUTLINECOLOR [OLNCLR] with transparent outline in second feature
#
# TEST: place the fonts DejaVuSansCondensed.ttf and DejaVuSerif-Italic.ttf into current dir.
# run: ./test_swedish_text.sh
@LarsSchy
LarsSchy / Norway_label.png
Last active February 23, 2021 18:55
skeletonize MS ticket 5854
Norway_label.png
@LarsSchy
LarsSchy / layer_comp.map
Created February 23, 2022 15:00
Testing "Chainable Compositing Filters"
MAP
#
# layer_comp.map
#
# Lars Schylberg, 2022-02-23
#
# Testing "Chainable Compositing Filters" from RFC113
#
# Test command: map2img -m layer_comp.map -o layer_comp.png
# tested with: MapServer version 7.7-dev, but should work with 7.4 and 7.6
@LarsSchy
LarsSchy / point_examples.map
Created February 26, 2022 17:40
Examples for Mapserver point symbology
MAP
#
# Lars Schylberg, 2021-02-26
#
#
NAME "point_examples"
EXTENT 0 0 15 10
SIZE 400 300
UNITS DD
IMAGECOLOR 200 200 200