# Copyright (C) 2000-2026 The Xastir Group
#
# This file is used to map OSM shapefiles by "geofabrik.ge" which are
# named "gis_osm_natural_a_free_1.*".  These files can be found at
# https://download.geofabrik.de/
#
# Because their signatures are the same, it also serves to render the
# "gis_osm_water_a_free_1" shapefiles
#

BEGIN {
dbfinfo="osm_id:code:fclass:name";
dbffields="fclass:name";
}

BEGIN_RECORD {key=""; lanes=1; color=35; fill_color=35; name=""; filled=1; pattern=0; display_level=65536; label_level=32; label_color=8; font_size=0; symbol=""; fill_style=0;}

/^name=(.+)$/ {name="$1"; next}

/^fclass=tree$/ {color=114; fill_color=114; fill_style=2; fill_stipple=2; display_level=256; label_level=16; font_size=1; next}

/^fclass=beach$/ {color=107; fill_color=107; fill_style=2; fill_stipple=2; display_level=8192; label_level=16; font_size=1; next}

/^fclass=peak$/ {color=46; fill_color=46; display_level=256; label_level=16; font_size=1; next}
/^fclass=cliff$/ {name="$(name)(cliff)"; color=74; fill_color=74; display_level=256; label_level=16; font_size=1; next}
/^fclass=volcano$/ {color=68; fill_color=68; display_level=256; label_level=16; font_size=1; next}

# color cave entrances and mines the same
/^fclass=cave_entrance$/ {color=127; fill_color=127; display_level=256; label_level=16; font_size=1; next}
/^fclass=mine$/ {color=127; fill_color=127; display_level=256; label_level=16; font_size=1; next}

/^fclass=spring$/ {color=117; fill_color=117; fill_style=2; fill_stipple=2; display_level=64; label_level=8; font_size=1; next}
/^fclass=glacier$/ {color=117; fill_color=117; fill_style=2; fill_stipple=1; display_level=256; label_level=16; font_size=1; next}

# Water features
/^fclass=water$/ {color=117; fill_color=117; fill_style=2; fill_stipple=0; display_level=256; label_level=64; label_color=117; font_size=1; next}
/^fclass=river$/ {color=117; fill_color=117; fill_style=2; fill_stipple=2; display_level=8192; label_level=128; label_color=117; font_size=1; next}
/^fclass=riverbank$/ {color=117; fill_color=117; fill_style=2; fill_stipple=1; display_level=8192; label_level=128; label_color=117; font_size=1; next}
/^fclass=reservoir$/ {color=117; fill_color=117; fill_style=2; fill_stipple=1; display_level=8192; label_level=128; label_color=117; font_size=1; next}
/^fclass=wetland$/ {color=101; fill_color=101; fill_style=2; fill_stipple=0; display_level=128; label_level=32; label_color=101 ;font_size=1; next}
/^fclass=dock$/ {color=122; fill_color=122; fill_style=2; fill_stipple=2; display_level=64; label_level=8; label_color=122; font_size=1; next}
