Last active
March 23, 2016 15:00
-
-
Save edigiacomo/76187acd6d16622b6a9d to your computer and use it in GitHub Desktop.
Simple MapServer file for uv (wind) raster data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Wind barbs for uv raster data. | |
# | |
# The symbol "windbarb" has two barbs. The symbol should be split in multiple symbols and | |
# the raster layer should have multiple CLASS with EXPRESSION: each CLASS will use the right | |
# number of barbs. | |
# | |
# Note: the uv values of the input file `out.tiff` are between 0 and 1. | |
MAP | |
IMAGETYPE PNG | |
OUTPUTFORMAT | |
NAME "png" | |
DRIVER AGG/PNG | |
MIMETYPE "image/png" | |
IMAGEMODE RGBA | |
TRANSPARENT ON | |
END | |
SIZE 1024 512 | |
EXTENT -180 -90 180 90 | |
SYMBOL | |
NAME "windbarb1" | |
TYPE vector | |
FILLED false | |
POINTS | |
0 0 | |
5 0 | |
-99 -99 | |
0 1 | |
1 0 | |
END | |
END | |
SYMBOL | |
NAME "windbarb2" | |
TYPE vector | |
FILLED false | |
POINTS | |
0 0 | |
5 0 | |
-99 -99 | |
0 1 | |
1 0 | |
-99 -99 | |
1 1 | |
2 0 | |
END | |
END | |
SYMBOL | |
NAME "windcalm" | |
TYPE ellipse | |
FILLED false | |
POINTS | |
1 1 | |
END | |
END | |
LAYER | |
EXTENT -180 -90 180 90 | |
NAME "test" | |
TYPE POINT | |
CONNECTIONTYPE UVRASTER | |
DATA out.tiff | |
PROCESSING "BANDS=1,2" | |
PROCESSING "UV_SPACING=32" | |
PROCESSING "UV_SIZE_SCALE=1" | |
PROCESSING "RESAMPLE=NEAREST" | |
CLASS | |
EXPRESSION ([uv_length] < 0.3) | |
STYLE | |
COLOR 0 0 0 | |
SYMBOL "windcalm" | |
SIZE 5 | |
POSITION CC | |
END | |
END | |
CLASS | |
EXPRESSION ([uv_length] < 0.7) | |
STYLE | |
COLOR 0 0 0 | |
SYMBOL "windbarb1" | |
SIZE 5 | |
ANGLE [uv_angle] | |
POSITION CC | |
END | |
END | |
CLASS | |
EXPRESSION ([uv_length] >= 0.7) | |
STYLE | |
COLOR 0 0 0 | |
SYMBOL "windbarb2" | |
SIZE 5 | |
ANGLE [uv_angle] | |
POSITION CC | |
END | |
END | |
END | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment