X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/1213ebaa3aac144fc3052839f9ead718e553ebec..28846fc961ca1c067b9ff5ad85a8c6e5d3b7b713:/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..fd30b0763 100644 --- a/cookbooks/imagery/templates/default/mapserver.map.erb +++ b/cookbooks/imagery/templates/default/mapserver.map.erb @@ -1,19 +1,50 @@ # 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=9" + 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=9" + END +<% end -%> + + NAME "map-<%= @layer %>" STATUS ON SIZE 256 256 UNITS METERS + <% if @background_colour -%> + IMAGECOLOR <%= @background_colour %> + <% end -%> IMAGETYPE <%= @extension %> PROJECTION - "init=<%= @projection %>" + "init=<%= @projection.downcase %>" END LAYER - NAME "<%= @name %>" + NAME "<%= @layer %>" DATA "<%= @source %>" PROJECTION - "init=<%= @projection %>" + <% if @projection == "EPSG:27700" -%> + <%# Override EPSG:27700 to use accurate nadgrid %> + "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs +nadgrids=/srv/imagery/common/ostn02-ntv2-data/OSTN02_NTv2.gsb" + <% else -%> + "init=<%= @projection.downcase %>" + <% end -%> END STATUS DEFAULT TYPE RASTER