From: Grant Slater Date: Thu, 2 Jul 2020 12:56:43 +0000 (+0100) Subject: imagery: OS OpenMap Local fixes X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/0f561d8864be5a3f2e212bc434a3f3afe28ee275?ds=sidebyside imagery: OS OpenMap Local fixes --- diff --git a/cookbooks/imagery/files/default/os-openmap-local-palette.txt b/cookbooks/imagery/files/default/os-openmap-local-palette.txt new file mode 100644 index 000000000..deb83599e --- /dev/null +++ b/cookbooks/imagery/files/default/os-openmap-local-palette.txt @@ -0,0 +1,256 @@ +0,0,0 +8,7,7 +24,24,24 +40,40,40 +52,52,52 +85,15,45 +49,83,63 +73,66,53 +61,61,72 +89,88,72 +80,80,80 +87,87,87 +112,83,88 +108,105,87 +87,88,104 +84,111,108 +100,100,100 +105,104,104 +120,120,118 +215,18,54 +148,105,35 +157,113,51 +216,120,19 +136,24,72 +189,38,104 +212,28,64 +216,47,79 +145,120,84 +142,96,102 +138,122,104 +138,120,120 +165,111,122 +217,69,74 +227,85,116 +63,143,54 +8,166,34 +0,166,41 +9,179,51 +55,148,82 +43,179,82 +76,132,88 +76,153,84 +97,170,90 +95,139,107 +121,159,121 +106,160,110 +124,184,117 +55,195,91 +54,200,88 +82,199,111 +152,152,8 +214,133,34 +225,151,59 +200,201,8 +243,243,0 +248,248,8 +174,140,87 +144,157,102 +136,136,120 +153,136,120 +136,158,120 +152,152,120 +162,136,104 +183,151,106 +187,184,104 +240,162,67 +201,155,102 +221,165,123 +226,173,102 +233,184,127 +146,204,109 +255,192,115 +248,200,120 +73,81,199 +255,60,140 +192,115,130 +235,101,128 +229,111,139 +0,159,184 +40,152,172 +69,135,144 +127,154,155 +92,167,180 +25,194,164 +120,214,142 +9,151,200 +0,154,207 +0,169,202 +14,170,200 +6,177,202 +24,161,216 +24,184,217 +45,168,210 +50,185,213 +0,191,230 +41,184,232 +75,184,213 +39,200,232 +81,201,215 +109,199,214 +115,216,212 +80,213,232 +85,216,248 +113,214,236 +117,232,248 +136,136,136 +153,136,136 +133,153,136 +152,152,136 +128,136,153 +152,136,152 +154,154,144 +152,152,152 +168,152,136 +185,150,136 +168,136,152 +185,135,153 +168,152,152 +184,152,152 +151,168,150 +157,191,153 +168,168,136 +184,168,136 +184,184,136 +168,168,152 +184,168,152 +184,184,152 +151,152,170 +171,152,171 +145,172,172 +167,167,167 +184,168,168 +168,188,168 +178,184,173 +184,184,168 +168,168,184 +185,167,184 +166,185,185 +183,184,183 +210,141,149 +255,135,158 +247,136,152 +200,168,132 +200,185,136 +216,191,128 +200,168,152 +199,184,152 +217,184,152 +210,145,169 +248,137,168 +232,154,167 +208,184,168 +242,166,184 +248,185,184 +141,193,137 +164,217,148 +189,220,165 +188,219,184 +158,225,175 +208,204,152 +242,200,145 +246,233,151 +200,200,168 +215,199,168 +216,216,168 +200,200,184 +216,200,184 +216,216,184 +232,200,168 +248,195,168 +232,216,168 +248,216,165 +232,200,184 +231,215,183 +248,216,184 +208,235,184 +232,232,168 +248,232,168 +228,248,168 +248,248,168 +232,232,184 +250,223,191 +252,225,189 +248,232,184 +232,248,184 +255,243,181 +247,247,184 +184,184,200 +248,182,201 +143,214,209 +181,207,204 +149,232,214 +179,232,204 +142,216,234 +169,216,226 +146,232,247 +176,232,242 +199,199,199 +216,200,200 +200,216,200 +216,216,200 +200,200,216 +217,200,216 +200,216,216 +216,216,216 +243,212,207 +200,232,200 +216,232,200 +200,248,200 +208,239,207 +209,241,205 +216,248,200 +200,232,216 +216,232,216 +200,248,216 +215,247,222 +216,247,216 +232,232,200 +251,232,201 +232,248,200 +248,248,200 +232,232,216 +248,232,216 +252,235,217 +232,248,216 +248,248,216 +216,216,232 +232,216,232 +247,215,229 +200,232,232 +216,232,232 +199,248,232 +216,248,232 +194,229,240 +200,232,248 +216,232,248 +199,248,248 +213,244,248 +212,244,250 +216,247,247 +230,235,228 +229,231,231 +232,232,232 +234,234,234 +248,232,232 +231,247,231 +247,247,232 +232,232,248 +248,232,248 +231,247,247 +252,252,252 +249,249,247 +254,254,254 +252,252,254 +255,255,255 +255,255,255 diff --git a/cookbooks/imagery/recipes/gb_os_sv.rb b/cookbooks/imagery/recipes/gb_os_sv.rb index 42136daf0..67056ce3d 100644 --- a/cookbooks/imagery/recipes/gb_os_sv.rb +++ b/cookbooks/imagery/recipes/gb_os_sv.rb @@ -26,6 +26,13 @@ cookbook_file "/srv/imagery/common/ossv-palette.txt" do mode "0644" end +cookbook_file "/srv/imagery/common/os-openmap-local-palette.txt" do + source "os-openmap-local-palette.txt" + owner "root" + group "root" + mode "0644" +end + cookbook_file "/srv/imagery/common/osstvw_process" do source "osstvw_process" owner "root" @@ -1052,10 +1059,10 @@ end imagery_layer "gb_os_om_local_2020_04" do site "os.openstreetmap.org" - title "Testing OS OpenMap Local" + title "OS OpenMap Local - April 2020" projection "EPSG:27700" - source "/data/imagery/gb/openmap-local/2020-04/os-openmap-local-2020-04-combined-auto.vrt" + source "/data/imagery/gb/openmap-local/2020-04/os-openmap-local-2020-04-combined-sea.vrt" copyright "Contains OS data © Crown copyright and database right 2020" - extension "png" + extension "os_om_local_png" url_aliases ["/om-local-2020-04"] end diff --git a/cookbooks/imagery/resources/layer.rb b/cookbooks/imagery/resources/layer.rb index 394142af7..c26ac085d 100644 --- a/cookbooks/imagery/resources/layer.rb +++ b/cookbooks/imagery/resources/layer.rb @@ -114,5 +114,5 @@ end def after_created notifies :create, "imagery_site[#{site}]" - notifies :reload, "service[nginx]" + notifies :restart, "service[nginx]" end diff --git a/cookbooks/imagery/templates/default/mapserver.map.erb b/cookbooks/imagery/templates/default/mapserver.map.erb index 4bec1334f..1f918d0f8 100644 --- a/cookbooks/imagery/templates/default/mapserver.map.erb +++ b/cookbooks/imagery/templates/default/mapserver.map.erb @@ -7,7 +7,7 @@ MAP MIMETYPE "image/png" IMAGEMODE RGB EXTENSION "png" - FORMATOPTION "COMPRESSION=9" + FORMATOPTION "COMPRESSION=6" FORMATOPTION "PALETTE_FORCE=on" FORMATOPTION "PALETTE=/srv/imagery/common/ossv-palette.txt" END @@ -19,7 +19,19 @@ MAP MIMETYPE "image/png" IMAGEMODE RGBA EXTENSION "png" - FORMATOPTION "COMPRESSION=9" + FORMATOPTION "COMPRESSION=6" + END +<% end -%> +<% if @extension == "os_om_local_png" -%> + OUTPUTFORMAT + NAME "os_om_local_png" + DRIVER AGG/PNG + MIMETYPE "image/png" + IMAGEMODE RGB + EXTENSION "png" + FORMATOPTION "COMPRESSION=6" + FORMATOPTION "PALETTE_FORCE=on" + FORMATOPTION "PALETTE=/srv/imagery/common/os-openmap-local-palette.txt" END <% end -%>