Skip to content

SE_RegisterRasterStyle

Mark Johnson edited this page Oct 6, 2018 · 9 revisions

Adding a Raster-Style in the Database from a XML-File

--> 'List of Sql-Commands'

<-- 'Index Page for RasterLite2 - Commands'


Original Documentation RasterLite2 SQL functions - reference list)

  • SE_RegisterRasterStyle(BLOB style)

Parameters [optional parameters : none]:

  • style: a BLOB created using XB_Create()

  • Sample
    • The registered Style will be identified either by
      • its unique Style ID or
      • by its Style Name
    • automatically retrieved from SLD/SE XML
SELECT SE_RegisterRasterStyle
( --create the BLOB
 XB_Create
 ( -- load the external xml file
  XB_LoadXML
  ( -- the value of 'Name' will be used as the style_name
   '../../common/source_styles/raster/rl2se.monochrome_red.xml'
  ),
  -- compression
  1, 
  -- with validation
  1  
 )
);

rl2se.monochrome_red.xml

  • the value of Name will be used as the style_name
    • rl2se.monochrome_red
<?xml version="1.0" encoding="UTF-8"?>
<RasterSymbolizer 
 version="1.1.0" 
 xsi:schemaLocation="http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/Symbolizer.xsd" 
 xmlns="http://www.opengis.net/se" 
 xmlns:ogc="http://www.opengis.net/ogc" 
 xmlns:xlink="http://www.w3.org/1999/xlink" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <Name>rl2se.monochrome_red</Name>
 <Description>
  <Title>Monochrome CTR Red</Title>
  <Abstract>Monochrome CTR: red instead of black</Abstract>
 </Description>
 <Opacity>1.0</Opacity>
 <ColorMap>
  <Categorize fallbackValue="#ffffff">
   <LookupValue>Rasterdata</LookupValue>
   <Value>#ffffff</Value>
   <Threshold>1</Threshold>
   <Value>#ff0000</Value>
  </Categorize>
 </ColorMap>
</RasterSymbolizer>

The result shown in WmsLibre, can be seen here


2015-09-02: Mark Johnson, Berlin Germany


Clone this wiki locally