Skip to content

Instantly share code, notes, and snippets.

@IReese
Created October 8, 2019 21:00
Show Gist options
  • Save IReese/9c50578d48017c1389815adfe37db5fc to your computer and use it in GitHub Desktop.
Save IReese/9c50578d48017c1389815adfe37db5fc to your computer and use it in GitHub Desktop.
Mapnik XML for Bathy Blending
<Map srs="+proj=merc +lon_0=100 +lat_ts=-41 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" background-color="#2a383e">
<Style name="niwa_twofifty_hs" comp-op="color-dodge">
<Rule>
<RasterSymbolizer scaling="bilinear" default-mode="linear" default-color="rgba(0, 0, 0, 0)">
<stop value="0" color="#222222"/>
<stop value="255" color="#ebebeb"/></RasterSymbolizer>
</Rule>
</Style>
<Layer name="niwa_twofifty_hs" srs="+proj=merc +lon_0=100 +lat_ts=-41 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs">
<StyleName>niwa_twofifty_hs</StyleName>
<Datasource>
<Parameter name="file">/RegionalBathymetry2008_HS.tif</Parameter>
<Parameter name="band">1</Parameter>
<Parameter name="type">gdal</Parameter>
</Datasource>
</Layer>
<Style name="niwa_twofifty_deuce" comp-op="color-dodge">
<Rule>
<RasterSymbolizer scaling="bilinear" default-mode="linear" default-color="rgba(0, 0, 0, 0)" opacity="0.75">
<stop value="-200" color="#e7f0ef"/>
<stop value="0" color="#88b3ac"/>
<stop value="350" color="rgba(0, 0, 0, 0)"/></RasterSymbolizer>
</Rule>
</Style>
<Layer name="niwa_twofifty" srs="+proj=merc +lon_0=100 +lat_ts=-41 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs">
<StyleName>niwa_twofifty_deuce</StyleName>
<Datasource>
<Parameter name="file">/RegionalBathymetry2008.tif</Parameter>
<Parameter name="band">1</Parameter>
<Parameter name="type">gdal</Parameter>
</Datasource>
</Layer>
<Style name="niwa_twofifty" comp-op="multiply" >
<Rule>
<RasterSymbolizer scaling="bilinear" default-mode="linear" default-color="rgba(0, 0, 0, 0)">
<stop value="-101" color="rgba(0, 0, 0, 0)"/>
<stop value="-100" color="#ffffff"/>
<stop value="10070" color="#000000"/></RasterSymbolizer>
</Rule>
</Style>
<Layer name="niwa_twofifty" srs="+proj=merc +lon_0=100 +lat_ts=-41 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs">
<StyleName>niwa_twofifty</StyleName>
<Datasource>
<Parameter name="file">/RegionalBathymetry2008.tif</Parameter>
<Parameter name="band">1</Parameter>
<Parameter name="type">gdal</Parameter>
</Datasource>
</Layer>
</Map>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment