### Julia OpenStreetMap Package ###
### MIT License                 ###
### Copyright 2014              ###

### Default Speed Limits in Kilometers Per Hour ###
const SPEED_ROADS_URBAN = Dict(
    1 => 95,    # Motorway
    2 => 72,    # Trunk
    3 => 48,    # Primary
    4 => 32,    # Secondary
    5 => 22,    # Tertiary
    6 => 12,    # Residential/Unclassified
    7 => 8,     # Service
    8 => 5)     # Living street

const SPEED_ROADS_RURAL = Dict(
    1 => 110,
    2 => 90,
    3 => 80,
    4 => 72,
    5 => 55,
    6 => 40,
    7 => 15,
    8 => 15)

### The following dictionaries are used for grouping ways    ###
### into limited, discrete classes for routing and plotting. ###

# Ordered by typical significance
const ROAD_CLASSES = Dict(
    "motorway" => 1,
    "trunk" => 2,
    "primary" => 3,
    "secondary" => 4,
    "tertiary" => 5,
    "unclassified" => 6,
    "residential" => 6,
    "service" => 7,
    "motorway_link" => 1,
    "trunk_link" => 2,
    "primary_link" => 3,
    "secondary_link" => 4,
    "tertiary_link" => 5,
    "living_street" => 8,
    "pedestrian" => 8,
    "road" => 6)

# Level 1: Cycleways, walking paths, and pedestrian streets
# Level 2: Sidewalks
# Level 3: Pedestrians typically allowed but unspecified
# Level 4: Agricultural or horse paths, etc.
const PED_CLASSES = Dict(
    "cycleway" => 1,
    "pedestrian" => 1,
    "living_street" => 1,
    "footway" => 1,
    "sidewalk" => 2,
    "sidewalk:yes" => 2,
    "sidewalk:both" => 2,
    "sidewalk:left" => 2,
    "sidewalk:right" => 2,
    "steps" => 2,
    "path" => 3,
    "residential" => 3,
    "service" => 3,
    "secondary" => 4,
    "tertiary" => 4,
    "primary" => 4,
    "track" => 4,
    "bridleway" => 4,
    "unclassified" => 4)

# Level 1: Bike paths
# Level 2: Separated bike lanes (tracks)
# Level 3: Bike lanes
# Level 4: Bikes typically allowed but not specified
const CYCLE_CLASSES = Dict(
    "cycleway" => 1,
    "cycleway:track" => 2,
    "cycleway:opposite_track" => 2,
    "bicycle:use_sidepath" => 2,
    "bicycle:designated" => 2,
    "cycleway:lane" => 3,
    "cycleway:opposite" => 3,
    "cycleway:opposite_lane" => 3,
    "cycleway:shared" => 3,
    "cycleway:share_busway" => 3,
    "cycleway:shared_lane" => 3,
    "bicycle:permissive" => 3,
    "bicycle:yes" => 3,
    "bicycle:dismount" => 4,
    "residential" => 4,
    "pedestrian" => 4,
    "living_street" => 4,
    "service" => 4,
    "unclassified" => 4)

const FEATURE_CLASSES = Dict(
    "aerialway" => 1,
    "aeroway" => 2,
    "amenity" => 3,
    "barrier" => 4,
    "boundary" => 5,
    "building" => 6,
    "craft" => 7,
    "emergency" => 8,
    "geological" => 9,
    "highway" => 10,
    "historic" => 11,
    "landuse" => 12,
    "leisure" => 13,
    "man_made" => 14,
    "military" => 15,
    "natural" => 16,
    "office" => 17,
    "place" => 18,
    "power" => 19,
    "public_transport" => 20,
    "railway" => 21,
    "route" => 22,
    "shop" => 23,
    "sport" => 24,
    "tourism" => 25,
    "waterway" => 26)

# Class 1: Residential/Accomodation
# Class 2: Commercial
# Class 3: Civic/Amenity
# Class 4: Other
# Class 5: Unclassified
const BUILDING_CLASSES = Dict(
    "accomodation" => 1,
    "apartments" => 1,
    "bungalow" => 1,
    "detached" => 1,
    "dormitory" => 1,
    "dwelling_house" => 1,
    "farm" => 1,
    "ger" => 1,
    "hotel" => 1,
    "house" => 1,
    "houseboat" => 1,
    "residential" => 1,
    "Residential" => 1,
    "semidetached_house" => 1,
    "static_caravan" => 1,
    "terrace" => 1,
    
    "commercial" => 2,
    "factory" => 2,
    "industrial" => 2,
    "manufacture" =>2,
    "office" => 2,
    "retail" => 2,
    "supermarket" => 2,
    "warehouse" => 2,

    "administrative" => 3,
    "cathedral" => 3,
    "chapel" => 3,
    "church" => 3,
    "civic" => 3,
    "kindergarten" => 3,
    "hospital" => 3,
    "mosque" => 3,
    "pavilion" => 3,
    "public" => 3,
    "school" => 3,
    "shrine" => 3,
    "stadium" => 3,
    "synagogue" => 3,
    "temple" => 3,
    "train_station" => 3,
    "transportation" => 3,
    "university" => 3,

    "barn" => 4,
    "bridge" => 4,
    "bunker" => 4,
    "cabin" => 4,
    "collapsed" => 4,
    "construction" => 4,
    "cowshed" => 4,
    "damaged" => 4,
    "farm_auxiliary" => 4,
    "garage" => 4,
    "garages" => 4,
    "greenhouse" => 4,
    "hangar" => 4,
    "hut" => 4,
    "kiosk" => 4,
    "roof" => 4,
    "semi" => 4,
    "service" => 4,
    "shed" => 4,
    "stable" => 4,
    "storage_tank" => 4,
    "sty" => 4,
    "tank" => 4,
    "transformer_tower" => 4,
    "ruins" => 4,

    "yes" => 5,
    "Yes" => 5)

### Standard map display "layers." ###
# const LAYER_STANDARD = Dict(
#     1 => Style(0x7BB6EF, 4), # Soft blue
#     2 => Style(0x66C266, 3), # Soft green
#     3 => Style(0xE68080, 3), # Soft red
#     4 => Style(0xFF9900, 3), # Soft orange
#     5 => Style(0xDADA47, 3), # Dark yellow
#     6 => Style(0x999999, 2), # Dark gray
#     7 => Style(0xE0E0E0, 2), # Light gray
#     8 => Style(0x999999, 1)) # Dark gray

# const LAYER_CYCLE = Dict(
#     1 => Style(0x006600, 3), # Green
#     2 => Style(0x5C85FF, 3), # Blue
#     3 => Style(0x5C85FF, 2), # Blue
#     4 => Style(0x999999, 2)) # Dark gray

# const LAYER_PED = Dict(
#     1 => Style(0x999999, 3), # Dark gray
#     2 => Style(0x999999, 3), # Dark gray
#     3 => Style(0x999999, 2), # Dark gray
#     4 => Style(0xE0E0E0, 2)) # Light gray

# const LAYER_FEATURES = Dict(
#     1 => Style(0x9966FF, 1.5, "."), # Lavender
#     2 => Style(0xFF0000, 1.5, "."), # Red
#     3 => Style(0x000000, 1.5, "."), # Black
#     4 => Style(0xFF66FF, 1.5, "."), # Pink
#     5 => Style(0x996633, 1.5, "."), # Brown
#     6 => Style(0xFF9900, 2.0, "."), # Orange
#     7 => Style(0xCC00CC, 1.5, ".")) # Brown

# const LAYER_BUILDINGS = Dict(
#     1 => Style(0xE1E1EB, 1, "-"), # Lighter gray
#     2 => Style(0xB8DBFF, 1, "-"), # Light blue
#     3 => Style(0xB5B5CE, 1, "-"), # Light gray
#     4 => Style(0xFFFF99, 1, "-"), # Pale yellow
#     5 => Style(0x006600, 1, "-")) # Green
