Skip to content

Instantly share code, notes, and snippets.

@cassioeskelsen
Created October 2, 2013 14:53
Show Gist options
  • Save cassioeskelsen/6795028 to your computer and use it in GitHub Desktop.
Save cassioeskelsen/6795028 to your computer and use it in GitHub Desktop.
SLD for DEM raster files with 13 colors
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>gtopo</Name>
<UserStyle>
<Name>dem</Name>
<Title>Simple DEM style</Title>
<Abstract>Classic elevation color progression</Abstract>
<FeatureTypeStyle>
<Rule>
<RasterSymbolizer>
<Opacity>1.0</Opacity>
<ColorMap>
<ColorMapEntry color="#000000" quantity="0" label="nodata" opacity="0.0" />
<ColorMapEntry color="#75B08D" quantity="0.01" label="values" />
<ColorMapEntry color="#91BF9C" quantity="20"/>
<ColorMapEntry color="#A9D3B1" quantity="50" label="values" />
<ColorMapEntry color="#C8E1C1" quantity="100" label="values" />
<ColorMapEntry color="#DCEBC8" quantity="150" label="values" />
<ColorMapEntry color="#FFFCD4" quantity="200" label="values" />
<ColorMapEntry color="#FFFCC8" quantity="250" label="values" />
<ColorMapEntry color="#FFECC4" quantity="300" label="values" />
<ColorMapEntry color="#FFDDAF" quantity="350" label="values" />
<ColorMapEntry color="#FCCF9E" quantity="400" label="values" />
<ColorMapEntry color="#FBC28E" quantity="500" label="values" />
<ColorMapEntry color="#E4E8F4" quantity="700" label="values" />
<ColorMapEntry color="#D6E1F2" quantity="900" label="values" />
</ColorMap>
</RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
@jemacchi
Copy link

jemacchi commented Nov 8, 2023

Simple and clean ! thanks for sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment