diff --git a/cagc.mk b/cagc.mk new file mode 100644 index 0000000..61af22c --- /dev/null +++ b/cagc.mk @@ -0,0 +1,9 @@ +OSM_EXTENT=404276 6546698 645590 6691451 +OSM_SRID=2154 +OSM_UNITS=meters +OSM_DB_CONNECTION=host=localhost dbname=osm user=www-data password=www-data port=5432 +STYLE=cagc + +#define _sports_clr17="#55aa00" + +include Makefile diff --git a/generate_style.py b/generate_style.py index 1206b1b..2cb8d14 100755 --- a/generate_style.py +++ b/generate_style.py @@ -184,8 +184,9 @@ where type in (\'forest\',\'wood\',\'pedestrian\',\'cemetery\',\'industrial\',\'commercial\',\ \'brownfield\',\'residential\',\'school\',\'college\',\'university\',\ \'military\',\'park\',\'golf_course\',\'hospital\',\'parking\',\'stadium\',\'sports_center\',\ - \'pitch\') order by area desc) as foo using unique osm_id using srid=OSM_SRID"' - }, + \'pitch\') order by area desc) as foo using unique osm_id using\ + srid=OSM_SRID"' + }, 'industrial_clr': '"#d1d1d1"', 'industrial_ol_clr': '"#d1d1d1"', @@ -232,7 +233,7 @@ 'education_lbl_ol_clr': "255 255 255", 'education_lbl_ol_width': 2, - 'sports_clr': '"#DED1AB"', + 'sports_clr': '"#C2D1B2"', 'display_sports_lbl' : {0:0, 12:1}, 'sports_font': "sc", 'sports_lbl_size': 8, @@ -612,7 +613,8 @@ }, 'cycleway_pattern': '2 4', 'cycleway_ol_width': 1, - 'cycleway_ol_clr': "0 0 0", + #'cycleway_ol_clr': "0 0 0", + 'cycleway_ol_clr': "200 200 200", 'display_footways': { 0:0, 15:1 @@ -970,9 +972,9 @@ }, 'village_lbl_size': { 0:0, - 10:8, - 13:9, - 15:10 + 10:6, + 13:7, + 15:8 }, 'village_size': { 0:0, @@ -991,7 +993,7 @@ 'display_hamlets': { 0:0, - 13:1 + 13:0 }, 'hamlet_font': "sc", 'hamlet_lbl_clr': { @@ -1012,7 +1014,7 @@ 'display_localities': { 0:0, - 13:1 + 13:0 }, 'locality_font': "sc", 'locality_lbl_clr': { @@ -1132,6 +1134,97 @@ 14:2 } }, + 'cagc':{ + 'motorway_clr': "253 146 58", + 'trunk_clr': "255 195 69", + 'primary_clr': { + 0:'193 181 157', + 9:"255 253 139" + }, + 'secondary_clr': { + 0:'193 181 157', + 10:"255 253 139" + }, + 'tertiary_clr': { + 0:'193 181 157', + 12:"255 253 139" + }, + 'other_clr': { + 0:'193 181 157', + 14:"255 255 255" + }, + 'pedestrian_clr': '250 250 245', + 'forest_clr': "192 227 187", + 'industrial_clr': "209 208 205", + 'education_clr': "222 210 172", + 'hospital_clr': "229 198 195", + 'residential_clr': "242 239 233", + 'land_clr': "242 239 233", + 'park_clr': '181 210 156', + 'ocean_clr': '153 179 204', + 'waterarea_clr': '153 179 204', + 'river_clr': '153 179 204', + 'stream_clr': '153 179 204', + 'canal_clr': '153 179 204', + + 'motorway_ol_clr': '186 110 39', + 'trunk_ol_clr': '221 159 17', + 'primary_ol_clr': '193 181 157', + 'secondary_ol_clr': '193 181 157', + 'tertiary_ol_clr': '193 181 157', + 'other_ol_clr': '193 181 157', + 'pedestrian_ol_clr': '193 181 157', + 'display_buildings':{ 0:0, 15:1} + }, + 'cagc_2':{ + 'motorway_clr': "253 146 58", + 'trunk_clr': "255 195 69", + 'primary_clr': { + 0:'193 181 157', + 9:"255 253 139" + }, + 'secondary_clr': { + 0:'193 181 157', + 10:"255 253 139" + }, + 'tertiary_clr': { + 0:'193 181 157', + 12:"255 253 139" + }, + 'other_clr': { + 0:'193 181 157', + 14:"255 255 255" + }, + 'pedestrian_clr': '250 250 245', + #'forest_clr': "203 216 195", + 'forest_clr': "143 205 135", + #'forest_clr': "192 227 187", + 'industrial_clr': "209 208 205", + 'education_clr': "222 210 172", + 'hospital_clr': "229 198 195", + 'residential_clr': "242 239 233", + 'land_clr': "242 239 233", + 'park_clr': '181 210 156', + #'ocean_clr': '153 179 204', + 'ocean_clr': '170 216 249', + #'waterarea_clr': '153 179 204', + 'waterarea_clr': '170 216 249', + #'river_clr': '153 179 204', + 'river_clr': '170 216 249', + #'stream_clr': '153 179 204', + 'stream_clr': '170 216 249', + #'canal_clr': '153 179 204', + 'canal_clr': '170 216 249', + + 'motorway_ol_clr': '186 110 39', + 'trunk_ol_clr': '221 159 17', + 'primary_ol_clr': '193 181 157', + 'secondary_ol_clr': '193 181 157', + 'tertiary_ol_clr': '193 181 157', + 'other_ol_clr': '193 181 157', + 'pedestrian_ol_clr': '193 181 157', + 'display_buildings':{ 0:0, 15:1} + }, 'google':{ 'motorway_clr': "253 146 58", 'trunk_clr': "255 195 69", @@ -1172,7 +1265,7 @@ 'tertiary_ol_clr': '193 181 157', 'other_ol_clr': '193 181 157', 'pedestrian_ol_clr': '193 181 157', - 'display_buildings':1 + 'display_buildings':{ 0:0, 15:1} }, 'michelin':{ 'motorway_clr': '228 24 24', @@ -1470,7 +1563,7 @@ # these are the preconfigured styles that can be called when creating the final mapfile, # e.g. with `make STYLE=google`. This will create an osm-google.map mapfile style_aliases = { - + "cagc":"default,outlined,cagc", # map with no road casing and few colors, suited for using as a basemap when overlaying # other layers without risk of confusion between layers. "default":"default", diff --git a/landusage.map b/landusage.map index 420cad5..40e1b7a 100644 --- a/landusage.map +++ b/landusage.map @@ -1,11 +1,11 @@ #if _display_landusage == 1 LAYER + NAME layername(landuse,_layer_suffix) TYPE POLYGON STATUS ON PROJECTION "init=epsg:OSM_SRID" END - NAME layername(landuse,_layer_suffix) GROUP "default" CONNECTIONTYPE POSTGIS CONNECTION "OSM_DB_CONNECTION" @@ -158,7 +158,7 @@ LAYER END #endif END - + CLASS EXPRESSION 'hospital' STYLE @@ -206,7 +206,7 @@ LAYER #endif END CLASS - EXPRESSION {sports_center,stadium,pitch} + EXPRESSION {sports_center,stadium} STYLE COLOR _sports_clr END @@ -218,7 +218,7 @@ LAYER SIZE _sports_lbl_size COLOR _sports_lbl_clr OUTLINECOLOR _sports_lbl_ol_clr - ENCODING "utf-8" + ENCODING "utf-8" OUTLINEWIDTH _sports_lbl_ol_width PRIORITY 1 WRAP ' ' @@ -228,6 +228,31 @@ LAYER END #endif END + CLASS + NAME "pitch" + EXPRESSION "pitch" + STYLE + COLOR _sports_clr + END +#if _display_sports_lbl==1 + LABEL + TYPE TRUETYPE + PARTIALS FALSE + FONT _sports_font + SIZE _sports_lbl_size + COLOR _sports_lbl_clr + OUTLINECOLOR _sports_lbl_ol_clr + ENCODING "utf-8" + OUTLINEWIDTH _sports_lbl_ol_width + PRIORITY 1 + WRAP ' ' + MAXLENGTH 6 + ALIGN CENTER + MINFEATURESIZE AUTO + END +#endif + END + END #if _display_transport_areas == 1 @@ -289,7 +314,7 @@ LAYER #endif DATA _waterarea_data MAXSCALEDENOM _maxscale - MINSCALEDENOM _minscale + MINSCALEDENOM _minscale PROCESSING "CLOSE_CONNECTION=DEFER" LABELITEM "name" CLASSITEM "type" @@ -358,7 +383,7 @@ LAYER CLASS EXPRESSION "river" STYLE - COLOR _river_clr + COLOR _river_clr WIDTH _river_width END #if _display_river_lbl == 1 diff --git a/osmbase.map b/osmbase.map index eae0d3d..483bf53 100644 --- a/osmbase.map +++ b/osmbase.map @@ -21,7 +21,7 @@ IMAGETYPE png MAXSIZE 4000 SIZE 800 800 EXTENT OSM_EXTENT -UNITS OSM_UNITS +UNITS OSM_UNITS IMAGECOLOR _ocean_clr0 WEB METADATA @@ -37,6 +37,7 @@ DEBUG _debug CONFIG "MS_ERRORFILE" "stderr" #endif +SYMBOLSET symbols.txt CONFIG "PROJ_LIB" _proj_lib PROJECTION "init=epsg:OSM_SRID" @@ -205,11 +206,4 @@ END #include "borders.map" #include "places.map" -SYMBOL - name "citycircle" - type ellipse - points 1 1 end - filled true -END - END diff --git a/symbols.txt b/symbols.txt new file mode 100644 index 0000000..2a9d212 --- /dev/null +++ b/symbols.txt @@ -0,0 +1,16 @@ +SYMBOLSET + + SYMBOL + name "citycircle" + type ellipse + points 1 1 end + filled true + END + + SYMBOL + name "soccer" + TYPE SVG + IMAGE symbols/sports-soccer.svg + END + +END diff --git a/symbols/sports-soccer.svg b/symbols/sports-soccer.svg new file mode 100644 index 0000000..d0c8ee2 --- /dev/null +++ b/symbols/sports-soccer.svg @@ -0,0 +1,348 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file