OSM on Paper/Printing via Maperitive, Easy Poster Printer and Microsoft ICE/Ashgabat city Maperitive style file

From OpenStreetMap Wiki
Jump to: navigation, search

Download

Download: file as of 2018-08-11

Source

// Source of original code: Default rendering rules for Maperitive resembling that of OSM Mapnik 
// http://maperitive.net

// Created by Igor Brejc
// Released under the Creative Commons Attribution-ShareAlike 3.0 License (http://creativecommons.org/licenses/by-sa/3.0/)
// Updates by Michael <quelbs_at_gmail.com>
// Icons used: Map icons CC-0 from SJJB Management (http://www.sjjb.co.uk/mapicons)

// Modified by Allan Mustard to add special handling of embassies, consulates, hotels, gas stations, and hospitals 
// in the city of Ashgabat, Turkmenistan
// We define shops more broadly to make grocery shopping in Ashgabat easier
// Street names rendered are the Turkmen language variants text : [[name:tk]]

features
	points, areas
		place neighborhood : place=neighbourhood
		historic ruins : historic=ruins
		amenity embassy : amenity=embassy
		amenity consulate : amenity=consulate
		amenity fuel : amenity=fuel
		amenity business : (building=commercial OR building=retail) AND NOT shop=mall
		amenity events : amenity=events_venue
		traffic : enforcement=maxspeed OR highway=speed_camera
		square : highway=pedestrian AND area=yes
		monument : historic=monument
		office government : office=government OR government=ministry OR amenity=police OR building=government OR name="Maslahat Kosgi" OR amenity=townhall OR military=office
		office post : amenity=post_office AND NOT name:simple="UPS"
		office UPS : amenity=post_office AND name:simple="UPS" 
		bus station : amenity=bus_station
		ashgabat airport : name="Ashgabat International Airport"
		shopping : shop=mall OR shop=supermarket OR amenity=marketplace OR landuse=retail 
		computer shop : shop=computer
		car : shop=car OR shop=car_repair
		hippodrome : sport=equestrian
		amenity hospital : (amenity=hospital AND name) OR (building=hospital AND name)
// avoid duplicates by only marking hospitals with a name (grounds vs. buildings)
		amenity clinic : amenity=clinic OR amenity=dentist
		amenity fire station : amenity=fire_station
		amenity police : amenity=police
		amenity church : amenity=place_of_worship AND religion=christian
		amenity mosque : amenity=place_of_worship AND religion=muslim
		amenity library : amenity=library
		amenity toymekany : amenity=events_venue
		amenity bank : amenity=bank
		amenity fitness : leisure=fitness_centre
		bus stop : highway=bus_stop
		railway station : railway=station OR building=train_station
		monorailstation : railway=tram_stop
		mini roundabout : highway=mini_roundabout
		gate : barrier=gate
		hotel : tourism=hotel or building=hotel
		museum : tourism=museum
		amenity parking : amenity=parking
		amenity pub : amenity=pub
		amenity cinema : amenity=cinema
		amenity circus : amenity=circus
		amenity theatre : amenity=theatre OR amenity=culture_center
		amenity library : amenity=library
		aerodrome : aeroway=aerodrome
		amenity restaurant : amenity=restaurant OR amenity=fast_food
		amenity cafe : amenity=cafe
		soccerfield : sport=soccer AND leisure=pitch
	// These are not shown on Mapnik
		puffin : traffic_signals
		memorial : historic=memorial areas
		constructsite : landuse=construction 
		apartmentbldg : building=apartments
		industrialbldg : building=industrial
		buildings : area[@isOneOf(building, yes, stadium, industrial, hotel, hospital, commercial, apartments, school, retail, kindergarten, university, college, government)]
        // exclude building=residential from this definition as we don't need to draw all private houses--that clutters the map
		house : building=house OR building=residential 
		water : natural=water OR waterway=riverbank OR landuse=reservoir OR landuse=basin or waterway=dock
		pond : water=pond
		grass : landuse=grass
		academic : area[@isOneOf(amenity, university, college, school,kindergarten)] area[@isOneOf(building, university, college, school,kindergarten)] area[@isOneOf(office, educational_institution, college)]
		school : building=school OR building=kindergarten OR building=university OR building=college
		playground : leisure=playground
		track : leisure=track
		graveyard : amenity=grave_yard OR landuse=cemetery
		landuse military : landuse=military OR military=barracks
		landuse nursery : landuse=plant_nursery
		park : leisure=park OR tourism=theme_park
		leisure pitch : leisure=pitch
		leisure sportscentre : leisure=sports_centre 
		leisure swim : sport=swimming OR leisure=swimming_pool 
		leisure ice : leisure=ice_rink
		golfcourse : leisure=golf_course
		golfclubhouse : golf=clubhouse
		stadium : leisure=stadium OR building=stadium
		landuse retail : landuse=retail
		landuse industrial : landuse=industrial
		commercial area : landuse=commercial
		residential area : landuse=residential
		aeroway apron : aeroway=apron
		aeroway terminal : aeroway=terminal
		aeroway taxiway : aeroway=taxiway
		highway pedestrian : highway=pedestrian
		ngo : office=ngo OR office=association
		pharmacy : amenity=pharmacy
		business : building=commercial OR building=industrial OR building=retail OR (building=yes AND shop*) 
		square : place=square

	lines
		oneway : oneway=yes OR oneway=true OR oneway=-1
		coastline : natural=coastline
		river : waterway=river
		stream : waterway=stream
		canal : waterway=canal
		drain : waterway=drain
		dock : waterway=dock
		railway rail : railway=rail
		railway lightrail : railway=light_rail
		monorail : railway=monorail
		platform : railway=platform OR public_transport=platform
		line barrier : barrier=wall OR barrier=fence
// added links missing from some highway definitions
		highway motorway : highway=motorway OR (highway=construction AND construction=motorway)
		highway motorway link : highway=motorway_link OR (highway=construction AND construction=motorway_link) 
		highway trunk : highway=trunk OR (highway=construction AND construction=trunk) OR highway=trunk_link OR (highway=construction AND construction=trunk_link)
		highway primary link : highway=primary_link OR (highway=construction AND construction=primary_link)
		highway primary : highway=primary OR (highway=construction AND construction=primary)
		highway secondary : highway=secondary OR (highway=construction AND construction=secondary) OR highway=secondary_link
		highway tertiary : highway=tertiary OR (highway=construction AND construction=tertiary) OR highway=tertiary_link
		highway unclassified : highway=unclassified OR (highway=construction AND construction=unclassified)
		highway residential : highway=residential OR (highway=construction AND construction=residential)
		highway living_street : highway=living_street OR (highway=construction AND construction=living_street)
		highway construction : highway=construction
		highway service : highway=service
		highway pedestrian : highway=pedestrian
		highway track : highway=track
		highway footway : highway=footway
		highway cycleway : highway=cycleway
		highway path : highway=path
		highway access private : access=private AND highway
		highway access destination : access=destination AND highway
		highway steps : highway=steps
		bridge foot : bridge=yes AND (foot=yes OR highway=footway)
		power_line : power=line OR power=minor_line
		aerialway closed: @isOneOf(aerialway,cable_car,gondola,mixed_lift)
		aerialway open: @isOneOf(aerialway,chair_lift,drag_lift)
		aeroway runway : aeroway=runway
		aeroway taxiway : aeroway=taxiway
		boundary country : boundary=administrative AND (admin_level=2 OR admin_level=4) AND NOT natural=coastline
		boundary province : boundary=administrative AND admin_level=6
		boundary municipal : boundary=administrative AND admin_level=8
// admin_level=9 are boroughs of Ashgabat ("uly etraplar") or independent villages
		boundary borough : boundary=administrative AND admin_level=9 AND place=district
		boundary village : boundary=administrative AND admin_level=9 AND place=village
// admin_level=10 are Mikrorayon/Etrap 1-11 and 30; Howdan A, B, W; and the Parahats (Mir) and annexed villages that are now neighborhoods
// admin_level=11 are subdivisions of these (e.g., Parahat 2/2)
		boundary neighborhood : boundary=administrative AND admin_level=10
		boundary subneighborhood : boundary=administrative AND admin_level=11
		
		contour major : contour[@isMulti(elevation, 100)]
		contour minor : contour[@isMulti(elevation, 20) and not @isMulti(elevation, 100)]
// Routes
		route ncn : relation[type=route AND route=bicycle AND network=ncn]
		route byway : relation[type=route AND route=bicycle AND network="National Byway"]
		route foot : relation[type=route AND route=foot]

	points
		place city : place=city
		place town : place=town
		place village : place=village
		place hamlet : place=hamlet
		place locality: place=locality
		place isolated_dwelling : place=isolated_dwelling
		place borough : place=district AND admin_level=9
		place suburb : place=suburb
		office company : office=company 
		diy : shop=doityourself
		supermarket : shop=supermarket
		convenience : shop=convenience
		peak : natural=peak
		powertower : power=tower OR power=pole
		info : information=guidepost
		bollard : barrier=bollard
		lift_gate : barrier=lift_gate
		aerialway station : aerialway=station
		motorway_junction : highway=motorway_junction
		house_number : addr:housenumber AND NOT name
// if it has a name, it's a business in a building that is already numbered
properties
// set defaults
	map-background-color	: #F1EEE8
	map-background-opacity	: 1
	map-sea-color : #B5D0D0
	font-weight : bold
	font-family : Verdana
	text-max-width : 7
	text-halo-width : 25%
	text-halo-opacity : 0.75
	text-align-horizontal : center
	text-align-vertical : center
	font-stretch : 0.9
	map.rendering.lflp.min-buffer-space : 5
	map.rendering.lflp.max-allowed-corner-angle : 45


rules

// rules for drawing major point-type features
		
	target : $featuretype(point)
// set zoom levels for municipalities
		if : place* 
			define
				font-weight : bold
				text-max-width : 1000
				text-align-horizontal : near
				font-size : 6:12;14:20
	
			if : *city
				define
					font-size : 6:12;14:20
					min-zoom : 6
					max-zoom : 14
					placement-value : 1000

			elseif : *borough
				define
					font-size : 8:12; 10:15
					min-zoom : 8
					max-zoom : 10
					placement-value : 50

			elseif : *town
				define
					font-size : 9:12;12:14;20:20
					min-zoom : 9
					placement-value : 20
			elseif : *village
				define
					font-size : 11:12;20:20
					min-zoom : 11
					placement-value : 1
			elseif : *hamlet
				define
					font-size : 14:12;20:16
					min-zoom : 14
					placement-value : 0.1

			elseif : *locality
				define
					font-size : 14:12;20:16
					min-zoom : 14
					placement-value : 0.1
			elseif : *suburb				
				define
					font-size : 12:12;16:16
					min-zoom : 12
					text-color : white black 50%
					placement-value : 10
			elseif : *neighborhood
				define
					max-zoom : 11


	target : house_number 
		define
			min-zoom : 16
			text-halo-width : 0
			font-size : 10
			placement-value : 0.01
			text : [[addr:housenumber]]
		draw : text

// monuments are valuable navigational landmarks
	target : monument
		define
			min-zoom: 16
			text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
			font-size : 16:10;20:12
			text-offset-vertical : 150%
			icon-image : icons/SJJB/png/tourist_monument.glow.32.png
		draw : text
		draw : icon

// define color fill rules for major area-type features
	target : $featuretype(area)
		define
			line-style : none
			line-width : 1

// We will deal with buildings separately below.
// Suppress text for some types of areas by converting text to null string 

		if : water
			define
				fill-color : #B5D0D0
				min-zoom : 8
			for : water=pond
				define
					min-zoom : 16
					
		elseif : square
			define
				fill-color : #e6e600
				fill-opacity : 0.2
				min-zoom : 15
				text : @any([[name:tk]], name, [[name:ru]], [[name:en]])
				font-size : 16:10;20:12
				
		elseif : place neighborhood 
// suppress printing of historical demolished neighborhoods
			for : (layer=-3) OR (layer=-4) 
				stop

			define
				fill-color : #d2a679 
				fill-opacity : 0.2
				min-zoom : 11
			for : admin_level=10
				define
					font-size : 11:09; 12:10;15:12;20:14
					font-stretch : 1.5
					text-color : #86592d
					text-offset-vertical : 90%
					text-halo-width : 2
					min-zoom : 11
					text : @any([[name:tk]], name, [[name:ru]], [[name:en]])

			for : admin_level=11
				define
					font-size : 15:10;20:12
					font-stretch : 1.2
					text-color : gray
					min-zoom : 15
					text-halo-width : 1
					text : @any([[name:tk]], name, [[name:ru]], [[name:en]])
			draw : fill				

		elseif : bus station
			define
				fill-color : #F5A9F2
				text : ""
			draw : fill

		elseif : railway station
			define
				icon-image :  icons/SJJB/png/transport_train_station.p.32.png
				 text : @any([[name:en]], name, [[name:tk]], [[name:ru]]) 
				min-zoom : 15
				font-size : 15:10;20:12
				text-offset-vertical: 150%
				text-color : blue

		elseif : grass
			define
				fill-color : #CFECA8
			draw : fill

		elseif : amenity parking 
			define
				min-zoom : 16
				fill-color : #F6EEB7
  				text : ""
				icon-image :  icons/SJJB/png/transport_parking_car.glow.32.png
			draw : fill

		elseif : park
			define
				fill-color : #C0F6B0
				min-zoom : 14.5
				font-size : 15:12;20:16
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
			draw : fill

		elseif : leisure garden
			define
				min-zoom : 15
				fill-color : #CFECA8
			draw : fill

		elseif : graveyard
			define
				fill-color : #A9CAAE
				min-zoom : 14
				font-size : 14:10;20:12
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
			draw : fill

		elseif : historic ruins
			define
				fill-color : #F5ECCE
				min-zoom : 15
				font-size : 15:10;20:12
				font-size : 15:10;20:12
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
			draw : fill				

		elseif : leisure sportscentre
			for : building
				define
					min-zoom : 16
					text-color : black
			else
				define
					min-zoom : 15
					text-color : #008000
					font-size : 15:12;16:14; 20:16
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				fill-color : #ccff99
			draw : fill

		elseif : leisure ice
			define
				fill-color : #58D3F7
				min-zoom : 16
				font-size : 16:10;20:12
				text-offset-vertical: 250%
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				icon-image :  icons/SJJB/png/sport_iceskating.glow.32.png
			draw : fill					

		elseif : leisure pitch
			for : soccerfield OR (sport=soccer) OR (sport=athletics)
				define
					text : ""			
			define
				fill-color : #89D2AE
				min-zoom : 13
				font-size : 13:10;20:12
			draw : fill

		elseif : leisure swim
			define
				fill-color : #58D3F7
				min-zoom : 16
				font-size : 16:10;20:12
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
			draw : fill

		elseif : stadium 
			define
				fill-color : #33CC99
				min-zoom : 16
				font-size : 16:10;20:12
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
			draw : fill

		elseif : golfclubhouse
			define
				min-zoom : 16
				font-size : 16:10;20:12
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])

		elseif : track
			define
				fill-color : #74DCBA
				min-zoom : 14
				font-size : 14:10;20:12
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
			draw : fill

		elseif : landuse retail
			define
				fill-color : #F0D9D9
				line-color : #F4A19E
				text : ""
			draw : fill
			draw : line

		elseif : landuse industrial
			define
				fill-color : #DFD1D6
				min-zoom : 15
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				font-size : 15:10;20:12
			draw : fill

		elseif : landuse nursery
			define
				min-zoom : 15
				fill-color : #CFECA8
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				font-size : 15:10;20:12
			draw : fill

		elseif : commercial area
			define
				fill-color : #EFC8C8
				min-zoom : 15
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				font-size : 15:10;20:12
			draw : fill

		elseif : landuse military
			define
				fill-color : #FE9898
				min-zoom : 14
				font-size : 14:10;16:12
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
			draw : fill

		elseif : aerodrome
			define
				fill-color : #E9D1FE
				line-style : solid
				line-color : #b3b3b0 black 10%		
				min-zoom : 11
			draw : fill

		elseif : *pedestrian
			for : area
				define
					min-zoom : 14
					fill-color : #EDEDED
					line-color : #B1B1B1 black 20%
					line-style : solid
				draw : fill

		elseif : golfcourse
			define
				min-zoom : 14
				icon-image :  icons/SJJB/png/sport_golf.glow.32.png
				text-offset-vertical: 450%
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				font-size : 14:10;20:12
				icon-width : 30
				fill-color : #CFECA8
			draw : fill

		elseif : amenity fitness
			define	
			define
				min-zoom : 16
				font-size : 16:10;20:12
				text-offset-vertical: 150%
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				icon-image : icons/SJJB/png/sport_gymnasium.n.32.png

		elseif : graveyard
			define
				min-zoom : 15
				fill-color : #CFECA8
				font-size : 16:12;20:16
				text-offset-vertical: 150%
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])

		elseif : academic 
			define
				min-zoom : 16
				font-size : 16:10;20:12
				text-offset-vertical: 150%
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])	
			if : school
				define
					fill-color : #BCA9A9
			else
				define
					fill-color : #e6f2ff
			draw : fill

		elseif : shopping
			define
				icon-image : icons/SJJB/png/shopping_supermarket.p.32.png
				min-zoom : 16
				icon-width : 16
				fill-color : #F5A9F2
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				font-size : 16:11;20:12
				text-color : #bb1cc9
				text-offset-vertical : 250%

		elseif : car
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				text-color : black
				text-offset-vertical : 150%	
				font-size : 16:10;18:11;20:12				
				icon-image : icons/SJJB/png/shopping_car.n.32.png

		elseif : amenity cinema 
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				text-color : brown
				text-offset-vertical : 265%	
				font-size : 16:10;18:11;20:12				
				icon-image : icons/SJJB/png/tourist_cinema.glow.32.png

		elseif : amenity circus
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				text-color : brown
				text-offset-vertical : 160%	
				font-size : 16:10;18:11;20:12

		elseif : amenity theatre
			define
				text : @any([[name:simple]], [[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				text-color : brown
				text-offset-vertical : 250%	
				font-size : 16:10;18:11;20:12				
				icon-image : icons/SJJB/png/tourist_theatre.p.32.png

		elseif : amenity hospital
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 15
				text-color : #DF0101	
				text-offset-vertical : -275%
				font-size : 15:10;18:11;20:12
				fill-color : #FAFAFA
				icon-image : icons/SJJB/png/health_hospital.glow.32.png
				icon-width : 15

		elseif : amenity restaurant
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				text-color : brown
				text-offset-vertical : 165%	
				font-size : 16:10;18:11;20:12
				icon-image : icons/SJJB/png/food_restaurant.p.32.png

		elseif : amenity cafe
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				text-color : brown
				text-offset-vertical : 165%	
				font-size : 16:10;18:11;20:12
				icon-image : icons/SJJB/png/food_cafe.glow.32.png

		elseif : amenity toymekany
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				text-color : black
				text-offset-vertical : 165%	
				font-size : 16:10;18:11;20:12
		elseif : museum
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				text-color : blue
				text-offset-vertical : 165%	
				font-size : 16:10;18:11;20:12

		elseif : amenity embassy
			define
				text : [[name:simple]]
				min-zoom : 15
				text-color : #734a08
				text-offset-vertical : 100%
				font-size : 15:9;16:10;18:11;20:12
				icon-image : icons/SJJB/png/poi_embassy.p.32.png
				min-zoom : 15
				icon-width : 16

		elseif : amenity consulate
			define
				text : [[name:simple]]
				min-zoom : 15
				text-color : #734a08
				text-offset-vertical : 100%
				font-size : 15:9;16:10;18:11;20:12
				icon-image : icons/SJJB/png/poi_embassy.p.32.png
				min-zoom : 14
				icon-width : 16

		elseif : amenity clinic
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 15
				text-color : #DF0101	
				text-offset-vertical : -250%
				font-size : 15:10;18:11;20:12
				icon-image : icons/SJJB/png/health_hospital.glow.32.png
				icon-width : 15

		elseif : aeroway terminal
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				fill-color : white
				font-size : 15:9;20:10
				text-color : black
			draw : fill

		elseif : aeroway apron
			define
				min-zoom : 14
				fill-color : #bfbfbf
			draw : fill				

		elseif : amenity business
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				text-color : black
				text-offset-vertical : 250%	
				font-size : 16:10;18:11;20:12

		elseif : office government
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				text-color : #006600	
				font-size : 16:10;18:11;20:12
				text-offset-vertical : 120%

		elseif : office post
			define
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				text-color : #006600	
				font-size : 16:10;18:11;20:12
				text-offset-vertical : 120%

		elseif : office UPS
			define
				text : @any([[name:simple]],[[name:en]], name, [[name:tk]], [[name:ru]])
				min-zoom : 16
				text-color : black
				font-size : 16:10;18:11;20:12

		elseif: amenity fire station
			define
				icon-image : icons/SJJB/png/amenity_firestation.p.32.png
				min-zoom : 15
				icon-width : 15
				font-size : 15:10;20:12
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				text-color : #FF0000
				text-offset-vertical : 150%	
	
		elseif : amenity fuel
			define
				min-zoom : 16
				icon-image : icons/SJJB/png/transport_fuel.glow.32.png
				icon-width : 40	
				text : ""						
		elseif : hotel
			define
				min-zoom : 16
				icon-image : icons/SJJB/png/accommodation_hotel2.p.32.png
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
				text-color : black
				text-offset-vertical : 250%	
				font-size : 16:10;18:11;20:12

		elseif : amenity bank
			define
				min-zoom : 16
				icon-image : icons/SJJB/png/money_bank2.glow.32.png
				text : @any([[name:simple]], [[name:en]], name, [[name:tk]], [[name:ru]])
				text-color : black
				text-offset-vertical : 150%	
				font-size : 16:10;18:11;20:12

		elseif : amenity events
			define
				min-zoom : 16
				text : @any([[name:en]], [[name:tk]], name, [[name:ru]])
				min-zoom : 16
				text-color : black
				text-offset-vertical : 150%	
				font-size : 16:10;18:11;20:12

		elseif : amenity library
			define
				min-zoom : 16
				text : @any([[name:en]], [[name:tk]], name, [[name:ru]])
				min-zoom : 16
				text-color : black
				text-offset-vertical : 250%	
				font-size : 16:10;18:11;20:12
				icon-image : icons/SJJB/png/amenity_library.glow.32.png				

		elseif : apartmentbldg
			define
				min-zoom : 16
				text : @any([[name:en]], [[name:tk]], name, [[name:ru]])
				min-zoom : 16
				text-color : black
				text-offset-vertical : 150%	
				font-size : 16:10;18:11;20:12	

		elseif : industrialbldg
			define
				min-zoom : 16
				text : @any([[name:en]], [[name:tk]], name, [[name:ru]])
				min-zoom : 16
				text-color : black
				text-offset-vertical : 150%	
				font-size : 16:10;18:11;20:12	

		elseif: amenity church
			define
				icon-image : icons/SJJB/png/place_of_worship_christian3.p.32.png
				min-zoom : 16
				icon-width : 16
				text-offset-vertical : -350%
				font-size : 11
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])

		elseif : amenity mosque
			define
				icon-image : icons/SJJB/png/place_of_worship_islamic3.glow.32.png
				min-zoom : 16
				icon-width : 16
				text-offset-vertical : 250%
				font-size : 11
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])

		elseif : ngo
			define
				min-zoom : 16
				icon-width : 16
				text-offset-vertical : 150%
				font-size : 16:10;18:11;20:12	
				text : @any([[name:en]], name, [[name:tk]], [[name:ru]])				

		else
			stop
		draw : icon	
		draw : text

// print ONLY the house number of detached single-family dwellings (building=house)
	target : house
		define
			min-zoom : 16
			text : [[addr:housenumber]]
			text-halo-width : 0
			font-size : 10
			placement-value : 0.01	
		draw : text

		
	 
// draw buildings that are not single-family dwellings
	target : buildings

// Draw the building outline and fill it in with a color
		define
			fill-color : #BCA9A9
			min-zoom : 16
			line-style : solid
			line-width : 1
			line-color : #666
		draw : line
		draw : fill

// Now we print the house number for all such buildings
		define
			min-zoom : 16
			text : [[addr:housenumber]]
			text-halo-width : 0
			font-size : 16:10;20:12
			placement-value : 0.01	
			text-offset-vertical:-125%
		draw : text

// rules for drawing a playground
	target : playground
		define
			fill-color : #CCFEF0
			line-style : none
			min-zoom : 17
			placement-value : 0.05
			line-color : #ADCCB5
			line-width : 1
		draw : line
		draw : fill



// Draw the airport
	target : aeroway runway
		define
			min-zoom : 11
			line-color : #BBBBCC
			line-width : 11:2;15:20
		draw : line

	target : aeroway taxiway
		define
			min-zoom : 11
			line-color : #BBBBCC
			line-width : 11:1;15:6
		draw : line

// Draw jurisdictional boundary lines
	target : boundary*
		define
			line-color : #9E1A99
			line-opacity : 0.5
		if : boundary country
			define
				line-width : 6:1;9:3;10:6
		elseif : boundary province
			define
				min-zoom : 4
				line-width : 4:1;11:3
				line-style : dash
		elseif : boundary municipal
			define
				min-zoom : 10
				line-width : 10:3;14:4
				line-style : dashlong
		elseif : boundary borough
			define
				min-zoom : 10
				max-zoom : 13
				line-width : 12:1;14:2
				line-style : dash
		elseif : boundary village
			define
				min-zoom : 12
				line-width : 12:1;14:2
				line-style : dash				
		elseif : boundary neighborhood 
			define
				min-zoom : 14
				line-width : 1.5
				line-style : dashlong
		elseif : boundary subneighborhood
			define
				min-zoom : 15
				line-width : 1.5
				line-style : dot
				line-color : #DB02D3
		draw : line

// Draw the railroad station and rail lines
	target : platform
		define
			min-zoom : 13
			line-color : gray
			line-width : 3
		draw : line
	target : railway rail
		define
			min-zoom : 13
			line-style : dashlong
			line-color : white
			line-width : 2
			border-style : solid
			border-color : gray
			border-width : 25%
		draw : line
		define
			min-zoom : 6
			max-zoom : 13
			line-style : none
			line-color : white black 30%
			line-width : 6:1;8:1;12:1.5
		draw : line
	target : monorail
		define
			min-zoom : 15
			line-color : white
			line-style : dot
			line-width : 1
			border-style : solid
			border-color : #0B1FCB
			border-width : 50%
		draw : line

// Rules for drawing streets and roads.  We largely use the Maperitive defaults since they are well designed.
	target : highway access*
		define
			min-zoom : 13
			line-width : 13:1;15:2;18:4
			line-style : dash
			line-color : #F7D4D4
		for : access=destination
			define
				line-color : lightblue white 50%
		draw : line

	target : highway construction
		define
			min-zoom : 13
			line-width : 13:2;15:4;18:10
			line-style : dot
			line-color : yellow
		for : construction=tertiary OR construction=secondary OR construction=primary
			define
				line-color : white
		draw : line

	target : motorway_junction
		define
			font-size : 12 
			min-zoom : 13
			text-color : #849BBD
			text-halo-width : 25%
			text-offset-vertical : 150%
		draw: text

	target : highway*
		define
			font-size : 15:12;18:16
			font-weight : bold
			text : [[name:tk]]

		for : oneway=yes OR oneway=true
			define
				min-zoom : 15
				shape : custom
				shape-def : 60,0,20,-40,20,-15,-60,-15,-60,15,20,15,20,40;Z
				shape-size : 12
				shape-aspect : 0.75
				shape-spacing : 6
				fill-color : #6C70D4
				line-style : none
			for : oneway=-1
				define
					angle : 180
			draw : shape

		define
			line-style : solid
			line-join : round
			line-start-cap : round
			line-end-cap : round

		if : *motorway*
			if : *link
				define
					line-width : 7:1;12:3;13:4;16:5;18:6
			else
				define
					line-width : 7:1;9:2;12:3;13:7;16:10;18:12
			define
				min-zoom : 12
				line-color : #849BBD
				border-style : solid
				border-color : #849BBD black 20%
				border-width : 15%
			draw : line
			define
				min-zoom : 7
				max-zoom : 12
				border-style : none
			draw : line
			define
				min-zoom : 10
				max-zoom : 20
				font-family : Tahoma
				text-align-horizontal : center
				text-align-vertical : center
				text : ref
				font-size : 14
				text-color : #fcfcfb
				text-halo-width : 0
				shape : custom
				shape-def : p:#809bc0;pw:5;f:#809bc0;m:-10,-10;l:10,-10;a:10,10,10,10;l:-10,10;a:10,10,-10,-10;z;p:#fcfcfb;pw:2;m:-10,-10;l:10,-10;a:10,10,10,10;l:-10,10;a:10,10,-10,-10;z
				shield-padding-left : 5
				shield-padding-right : 5
				shield-padding-top : 7
				shield-padding-bottom : 7
				shield-resize-mode : free
//			draw : shield
			define
				min-zoom : 13
				max-zoom : 20
			draw : text
		elseif : *trunk*
			define
				min-zoom : 12
				line-color : #96D296
				line-width : 11:1;13:2;15:10;18:12
				border-style : solid
				border-color : #96D296 black 20%
				border-width : 15%
			for : tunnel=yes
				define
					border-style : dot
			draw : line
			define
				min-zoom : 7
				max-zoom : 12
				border-style : none
			draw : line
			define
				min-zoom : 7
				max-zoom : 20
			draw : text
		elseif : *primary*
			define
				min-zoom : 11
				line-color : #ECA2A3
				line-width : 11:2;12:2;15:10;18:12
				border-style : solid
				border-color : #ECA2A3 black 20%
				border-width : 15%
			for : tunnel=yes
				define
					border-style : dot
			draw : line
			define
				min-zoom : 7
				max-zoom : 11
				border-style : none
			draw : line
			define
				min-zoom : 13
				max-zoom : 20			
			draw : text
		elseif : *secondary
			define
				min-zoom : 12
				line-color : #FDD6A4
				line-width : 10:1;11:2;13:2;15:10;18:12
				border-style : solid
				border-color : #CAA36F
				border-width : 5%
			for : tunnel=yes
				define
					border-style : dot
			for : bridge=yes
				define
					border-color : #000
					border-width : 8%
			draw : line
			define
				min-zoom : 8.5
				max-zoom : 12
				border-style : none
			draw : line
			define
				min-zoom : 13
				max-zoom : 20
			draw : text
		elseif : *tertiary
			define
				min-zoom : 13
				line-color : #FEFEB2
				line-width : 10:1;13:2;15:10;18:12
				border-style : solid
				border-color : #FEFEB2 black 20%
				border-width : 15%
			for : tunnel=yes
				define
					border-style : dot
			for : bridge=yes
				define
					border-color : #000000
			draw : line
			define
				min-zoom : 10
				max-zoom : 13
				line-color : white black 25%
				border-style : none
			draw : line
			define
				min-zoom : 15
				max-zoom : 20
			draw : text
		elseif : *service
			define
				min-zoom : 13
				line-color : white
				line-width : 12:0.5;13:1;15:3;18:5
				border-style : solid
				border-color : #FEFEB2 black 20%
				border-width : 15%
			for : tunnel=yes
				define
					border-style : dot
			for : bridge=yes
				define
					border-color : #000
			draw : line
			draw : text
		elseif : *pedestrian
			for : not area
				define
					min-zoom : 13
					line-color : #EDEDED
					line-width : 7:0.6;9:1;10:1.2;12:2.5;13:3;16:5;18:6
					border-style : solid
					border-color : #B1B1B1 black 20%
					border-width : 15%
				for : tunnel=yes
					define
						border-style : dot
				for : bridge=yes
					define
						border-color : #000
				draw : line
				draw : text

		elseif : $regex("(.*residential)|(.*unclassified)")
			define
				min-zoom : 13
				line-color : white
				line-width : 12:1;13:1.5;15:6;18:15
				border-style : solid
				border-color : white black 25%
				border-width : 15%
			for : surface=unpaved
				define
					line-color : #F3E2A9
			for : tunnel=yes
				define
					border-style : dot
			for : bridge=yes
				define
					border-color : #000
			draw : line
			define
				min-zoom : 10
				max-zoom : 13
				border-style : none
				line-color : white black 25%
			draw : line
			define
				min-zoom : 15
				max-zoom : 20
			draw : text
		elseif : *living_street
			define
				min-zoom : 15
				line-color : white black 25%
				line-width : 12:1;13:1.5;15:6;18:15
				border-style : none
			for : tunnel=yes
				define
					border-style : dot
			for : bridge=yes
				define
					border-color : #000
			draw : line
			define
				min-zoom : 15
				max-zoom : 20
			draw : text
		elseif : *track
			define
				min-zoom : 13
				line-color : #9D7517
				line-width : 13:0.5;15:1;18:1.5
				line-style : dash
				border-style : solid
				border-color : white
				border-width : 100%
				border-opacity : 0.3
			for : tracktype=grade1
				define
					line-style : solid
					line-width : 12.5:0.5;13:1;15:1.5;18:2
			for : tracktype=grade2
				define
					line-style: dashlong
			for : tracktype=grade3
				define
					line-style: dash
			for : tracktype=grade4
				define
					line-style: dashdot
			for : tracktype=grade5
				define
					line-style: dashdotdot
			for : tunnel=yes
				define
					border-style : dot
			for : bridge=yes
				define
					border-color : #000
			draw : line
			define
				min-zoom : 15
				max-zoom : 20
			draw : text
		elseif : *footway
			define
				min-zoom : 15
				line-color : #F68474
				line-width : 13:0.5;15:1;18:1.5
				line-style : dot
				border-style : solid
				border-color : white
				border-width : 100%
				border-opacity : 0.3
			for : tunnel=yes
				define
					border-style : dot
			for : bridge=yes
				define
					border-color : #000000
			draw : line
			draw : text
		elseif : *cycleway
			define
				min-zoom : 15
				line-color : blue
				line-width : 13:0.5;15:1;18:1.5
				line-style : dot
				border-style : solid
				border-color : white
				border-width : 100%
				border-opacity : 0.3
			for : tunnel=yes
				define
					border-style : dot
			for : bridge=yes
				define
					border-color : #000000
					border-opacity : 1
			draw : line
			draw : text
		elseif : *path
			define
				min-zoom : 15
				line-color : #6E7C6D
				line-width : 13:0.5;15:1;18:1.5
				line-style : dash
				border-style : solid
				border-color : white
				border-width : 100%
				border-opacity : 0.3
			for : tunnel=yes
				define
					border-style : dot
			for : bridge=yes
				define
					border-color : #000
			draw : line
			draw : text
		else
			stop

	target : highway steps
		define
			min-zoom : 16
			shape : custom
			shape-def : -1,1, -1,-1, 1,-1, 1,1;Z
			shape-spacing : 2
			shape-size : 16:1;20:3
			shape-aspect : 3
			fill-color : #F98072
			line-style : none
		draw : shape

	target : line barrier
		define
			min-zoom : 15
			line-color : black
			line-width : 1
		for:barrier=fence
			define
				min-zoom:16
				line-color:#777
		draw : line

	target : bridge foot
		define
			min-zoom : 15
			line-color : white
			line-width : 7:0.6;9:1;10:1.2;12:2.5;13:3;16:5;18:6
			border-style : solid
			border-color : #FEFEB2 black 20%
			border-width : 15%
		draw : line
		draw : text

	target : river
		define
			line-color : #B5D0D0
			line-width : 7:1;12:2;14:5
		draw : line
		define
			min-zoom:13
			font-size:13:10;16:14
			text-color:#B5D0D0
			font-weight:normal
		draw:text
	target : stream
		define
			line-color : #B5D0D0
			line-width : 13:1;15:2
		draw : line
		define
			min-zoom:13
			font-size:13:10;16:14
			text-color:#B5D0D0
			font-weight:normal
		draw:text

	target : canal
		define
			min-zoom : 12
			line-color : #B5D0D0
			line-width : 12:1;17:8
		draw : line
		define
			min-zoom:13
			font-size:13:10;16:14
			text-color:#B5D0D0
			font-weight:normal
		draw:text

	target : drain
		define
			min-zoom : 15
			line-color : #B5D0D0
			line-width : 1
		draw : line

	target : bus station
		define
			icon-image : icons/SJJB/png/transport_bus_station.p.32.png
			min-zoom : 13
			font-size : 13:11;20:14
			text-color : #7981B0
			text-offset-vertical : -150%			
			text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
		draw : icon
		draw : text		

	target: bus stop
		define
			icon-image : icons/SJJB/png/transport_bus_stop.p.32.png
			min-zoom : 16
			icon-width : 16:10;18:12
		draw : icon


	target: mini roundabout
		define
			icon-image : icons/SJJB/png/transport_roundabout_anticlockwise.p.32.png
			min-zoom : 16
			icon-width : 9
		draw : icon

	target: memorial
		define
			icon-image : icons/SJJB/png/tourist_memorial.p.32.png
			min-zoom : 16
			icon-width : 16
			font-size : 10
			text : @any([[name:en]], name, [[name:tk]], [[name:ru]])
			text-offset-vertical : 150%
			text-color : #0040FF
		draw : icon
		draw : text


	target : puffin
		define
			icon-image : icons/SJJB/png/transport_traffic_lights.glow.32.gif
			min-zoom : 16
			icon-width : 16
		draw : icon

// highlight construction sites
	target : constructsite 
		define
			min-zoom : 10
			fill-color : #F7BE81
			line-style : none
		draw : fill
		define
			min-zoom : 15
			text : "construction" "\n" "site"
			text-halo-width : 0%			
			text-color : #000000
			font-style : normal
			font-weight : normal
			font-size : 12
		draw : text

	target : traffic
		define
			icon-image : icons/SJJB/png/enforcement_radar_.n.32.png
			min-zoom : 16
			icon-width : 18
			text : [[maxspeed]]
			text-offset-vertical : 200%
			text-color : red
			font-size : 16:10;20:12
		draw : icon
		draw : text

	target : gate
		define
			icon-image : icons/SJJB/png/barrier_gate.p.32.png
			min-zoom : 16
			icon-width : 7
		draw : icon


	target: contour*
		define
			line-color : #7f3300
			line-opacity : 0.35
			curved : true
		if : *major
			define
				map.rendering.contour.label : true
				min-zoom : 9
				line-width : 11:0.1;11.9:1;12:2
				font-size : 12
				font-style : italic
				font-weight : normal
				text-halo-width : 35%
				text-halo-opacity : 1
				text-halo-color : #F1EEE8
		else
			define
				min-zoom : 14
				line-width : 1
		draw : contour

	target: coastline
		define
			line-color : #B5D0D0
			line-width : 2
		draw : line