# Copyright (C) 2003-2016  The Xastir Group
#
#
# This file is used to map OSM shapefiles by "geofabrik.ge" which are
# named "gis_osm_buildings_free_1.dbf".  These files can be found at
# https://download.geofabrik.de/

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

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

# select the name given in the record
/^name=(.+)$/ {name="$1";next}

/^fclass=building$/  {lanes=1; color=40; display_level=8; label_level=4; fill_color=113; font_size=3; next}

# Make commercial properties green with different stipples
/^type=commercial$/ {color=75; fill_color=75; fill_style=2; fill_stipple=2; next;}
/^type=retail$/ {color=75; fill_color=75; fill_style=2; fill_stipple=1; next;}

# key: set the search key to be the Tiger/Line ID.  Not currently
# used.
#/^TLID=(.*)$/ {key=$1; next}

# just a demo of the END_RECORD and END rules:
#END_RECORD {name="$name ($key)";}
#END {}
