X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/1213ebaa3aac144fc3052839f9ead718e553ebec..891a36508c7c3bbfe041cb0dd1a39c2f84d0f9ff:/cookbooks/imagery/templates/default/mapserver.map.erb?ds=sidebyside diff --git a/cookbooks/imagery/templates/default/mapserver.map.erb b/cookbooks/imagery/templates/default/mapserver.map.erb index 29a83c27c..c918ca9f1 100644 --- a/cookbooks/imagery/templates/default/mapserver.map.erb +++ b/cookbooks/imagery/templates/default/mapserver.map.erb @@ -1,23 +1,69 @@ # DO NOT EDIT - This file is being maintained by Chef MAP - NAME "map-<%= @name %>" +<% if @extension == "os_sv_png" -%> + OUTPUTFORMAT + NAME "os_sv_png" + DRIVER AGG/PNG + MIMETYPE "image/png" + IMAGEMODE RGB + EXTENSION "png" + FORMATOPTION "COMPRESSION=6" + FORMATOPTION "PALETTE_FORCE=on" + FORMATOPTION "PALETTE=/srv/imagery/common/ossv-palette.txt" + END +<% end -%> +<% if @extension == "os_sv_diff_png" -%> + OUTPUTFORMAT + NAME "os_sv_diff_png" + DRIVER AGG/PNG + MIMETYPE "image/png" + IMAGEMODE RGBA + EXTENSION "png" + 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 -%> + + NAME "map-<%= @layer %>" STATUS ON SIZE 256 256 UNITS METERS + <% if @background_colour -%> + IMAGECOLOR <%= @background_colour %> + <% end -%> IMAGETYPE <%= @extension %> PROJECTION - "init=<%= @projection %>" + <% if @projection == "namibia_aerial" -%> + "+proj=tmerc +lat_0=0 +lon_0=17 +k=1 +x_0=600000 +y_0=10000000 +ellps=WGS84 +units=m +no_defs" + <% else -%> + "init=<%= @projection.downcase %>" + <% end -%> END LAYER - NAME "<%= @name %>" + NAME "<%= @layer %>" DATA "<%= @source %>" PROJECTION - "init=<%= @projection %>" + <% if @projection == "namibia_aerial" -%> + "+proj=tmerc +lat_0=0 +lon_0=17 +k=1 +x_0=600000 +y_0=10000000 +ellps=WGS84 +units=m +no_defs" + <% else -%> + "init=<%= @projection.downcase %>" + <% end -%> END STATUS DEFAULT TYPE RASTER - PROCESSING "RESAMPLE=AVERAGE" - PROCESSING "CLOSE_CONNECTION=DEFER" + PROCESSING "RESAMPLE=AVERAGE" + PROCESSING "CLOSE_CONNECTION=DEFER" END # layer END