Skip to main content
added 13 characters in body
Source Link
Lukas
  • 203
  • 2
  • 6

I am working with Geoserver for some weeks now and were able to deploy some services already. For my thematic map (e.g. temperature) I created a custom style displaying all tiles in specific colors (blue, yellow, red). Therefore I want to create a legend, but I really dont know how to do this. This legend should show 3 polygons in 3 different colors and some text right of it. Something like "[red polygon] > 30".

custom style sld:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
    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">
  <NamedLayer>
    <Name>Temperature</Name>
    <UserStyle>
      <Title>My Temperature Style</Title>
      <FeatureTypeStyle>
        <Rule>
            <PolygonSymbolizer>
               <Fill>
                 <CssParameter name="fill">
                   <ogc:Function name="Interpolate">
                     <ogc:PropertyName>dTA</ogc:PropertyName>

                     <ogc:Literal>0</ogc:Literal>
                     <ogc:Literal>#0000ff</ogc:Literal>

                     <ogc:Literal>15</ogc:Literal>
                     <ogc:Literal>#ffff00</ogc:Literal>

                     <ogc:Literal>30</ogc:Literal>
                     <ogc:Literal>#ff0000</ogc:Literal>
                     
                     <ogc:Literal>color</ogc:Literal>
                   </ogc:Function>
                 </CssParameter>
               </Fill>
            </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>

any idea?

I am working with Geoserver for some weeks now and were able to deploy some services already. For my thematic map (e.g. temperature) I created a custom style displaying all tiles in specific colors (blue, yellow, red). Therefore I want to create a legend, but I really dont know how to do this. This legend should show 3 polygons in 3 different colors and some text right of it. Something like "[red polygon] > 30".

custom style sld:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
    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">
  <NamedLayer>
    <Name>Temperature</Name>
    <UserStyle>
      <Title>My Temperature Style</Title>
      <FeatureTypeStyle>
        <Rule>
            <PolygonSymbolizer>
               <Fill>
                 <CssParameter name="fill">
                   <ogc:Function name="Interpolate">
                     <ogc:PropertyName>dTA</ogc:PropertyName>

                     <ogc:Literal>0</ogc:Literal>
                     <ogc:Literal>#0000ff</ogc:Literal>

                     <ogc:Literal>15</ogc:Literal>
                     <ogc:Literal>#ffff00</ogc:Literal>

                     <ogc:Literal>30</ogc:Literal>
                     <ogc:Literal>#ff0000</ogc:Literal>
                     
                     <ogc:Literal>color</ogc:Literal>
                   </ogc:Function>
                 </CssParameter>
               </Fill>
            </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>

I am working with Geoserver for some weeks now and were able to deploy some services already. For my thematic map (e.g. temperature) I created a custom style displaying all tiles in specific colors (blue, yellow, red). Therefore I want to create a legend, but I really dont know how to do this. This legend should show 3 polygons in 3 different colors and some text right of it. Something like "[red polygon] > 30".

custom style sld:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
    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">
  <NamedLayer>
    <Name>Temperature</Name>
    <UserStyle>
      <Title>My Temperature Style</Title>
      <FeatureTypeStyle>
        <Rule>
            <PolygonSymbolizer>
               <Fill>
                 <CssParameter name="fill">
                   <ogc:Function name="Interpolate">
                     <ogc:PropertyName>dTA</ogc:PropertyName>

                     <ogc:Literal>0</ogc:Literal>
                     <ogc:Literal>#0000ff</ogc:Literal>

                     <ogc:Literal>15</ogc:Literal>
                     <ogc:Literal>#ffff00</ogc:Literal>

                     <ogc:Literal>30</ogc:Literal>
                     <ogc:Literal>#ff0000</ogc:Literal>
                     
                     <ogc:Literal>color</ogc:Literal>
                   </ogc:Function>
                 </CssParameter>
               </Fill>
            </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>

any idea?

deleted 40 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

I am working with Geoserver for some weeks now and were able to deploy some services already. For my thematic map (e.g. temperature) I created a custom style displaying all tiles in specific colors (blue, yellow, red). Therefore I want to create a legend, but I really dont know how to do this. This legend should show 3 polygons in 3 different colors and some text right of it. Something like "[red polygon] > 30". I would appreciate any sort of support.

custom style sld:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
    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">
  <NamedLayer>
    <Name>Temperature</Name>
    <UserStyle>
      <Title>My Temperature Style</Title>
      <FeatureTypeStyle>
        <Rule>
            <PolygonSymbolizer>
               <Fill>
                 <CssParameter name="fill">
                   <ogc:Function name="Interpolate">
                     <ogc:PropertyName>dTA</ogc:PropertyName>

                     <ogc:Literal>0</ogc:Literal>
                     <ogc:Literal>#0000ff</ogc:Literal>

                     <ogc:Literal>15</ogc:Literal>
                     <ogc:Literal>#ffff00</ogc:Literal>

                     <ogc:Literal>30</ogc:Literal>
                     <ogc:Literal>#ff0000</ogc:Literal>
                     
                     <ogc:Literal>color</ogc:Literal>
                   </ogc:Function>
                 </CssParameter>
               </Fill>
            </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>

I am working with Geoserver for some weeks now and were able to deploy some services already. For my thematic map (e.g. temperature) I created a custom style displaying all tiles in specific colors (blue, yellow, red). Therefore I want to create a legend, but I really dont know how to do this. This legend should show 3 polygons in 3 different colors and some text right of it. Something like "[red polygon] > 30". I would appreciate any sort of support.

custom style sld:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
    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">
  <NamedLayer>
    <Name>Temperature</Name>
    <UserStyle>
      <Title>My Temperature Style</Title>
      <FeatureTypeStyle>
        <Rule>
            <PolygonSymbolizer>
               <Fill>
                 <CssParameter name="fill">
                   <ogc:Function name="Interpolate">
                     <ogc:PropertyName>dTA</ogc:PropertyName>

                     <ogc:Literal>0</ogc:Literal>
                     <ogc:Literal>#0000ff</ogc:Literal>

                     <ogc:Literal>15</ogc:Literal>
                     <ogc:Literal>#ffff00</ogc:Literal>

                     <ogc:Literal>30</ogc:Literal>
                     <ogc:Literal>#ff0000</ogc:Literal>
                     
                     <ogc:Literal>color</ogc:Literal>
                   </ogc:Function>
                 </CssParameter>
               </Fill>
            </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>

I am working with Geoserver for some weeks now and were able to deploy some services already. For my thematic map (e.g. temperature) I created a custom style displaying all tiles in specific colors (blue, yellow, red). Therefore I want to create a legend, but I really dont know how to do this. This legend should show 3 polygons in 3 different colors and some text right of it. Something like "[red polygon] > 30".

custom style sld:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
    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">
  <NamedLayer>
    <Name>Temperature</Name>
    <UserStyle>
      <Title>My Temperature Style</Title>
      <FeatureTypeStyle>
        <Rule>
            <PolygonSymbolizer>
               <Fill>
                 <CssParameter name="fill">
                   <ogc:Function name="Interpolate">
                     <ogc:PropertyName>dTA</ogc:PropertyName>

                     <ogc:Literal>0</ogc:Literal>
                     <ogc:Literal>#0000ff</ogc:Literal>

                     <ogc:Literal>15</ogc:Literal>
                     <ogc:Literal>#ffff00</ogc:Literal>

                     <ogc:Literal>30</ogc:Literal>
                     <ogc:Literal>#ff0000</ogc:Literal>
                     
                     <ogc:Literal>color</ogc:Literal>
                   </ogc:Function>
                 </CssParameter>
               </Fill>
            </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>
added 1322 characters in body
Source Link
Lukas
  • 203
  • 2
  • 6

I am working with Geoserver for some weeks now and were able to deploy some services already. For my thematic map (e.g. temperature) I created a custom style displaying all tiles in specific colors (blue, yellow, red). Therefore I want to create a legend, but I really dont know how to do this. This legend should show 3 polygons in 3 different colors and some text right of it. Something like "[red polygon] > 30". I would appreciate any sort of support.

custom style sld:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
    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">
  <NamedLayer>
    <Name>Temperature</Name>
    <UserStyle>
      <Title>My Temperature Style</Title>
      <FeatureTypeStyle>
        <Rule>
            <PolygonSymbolizer>
               <Fill>
                 <CssParameter name="fill">
                   <ogc:Function name="Interpolate">
                     <ogc:PropertyName>dTA</ogc:PropertyName>

                     <ogc:Literal>0</ogc:Literal>
                     <ogc:Literal>#0000ff</ogc:Literal>

                     <ogc:Literal>15</ogc:Literal>
                     <ogc:Literal>#ffff00</ogc:Literal>

                     <ogc:Literal>30</ogc:Literal>
                     <ogc:Literal>#ff0000</ogc:Literal>
                     
                     <ogc:Literal>color</ogc:Literal>
                   </ogc:Function>
                 </CssParameter>
               </Fill>
            </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>

I am working with Geoserver for some weeks now and were able to deploy some services already. For my thematic map (e.g. temperature) I created a custom style displaying all tiles in specific colors (blue, yellow, red). Therefore I want to create a legend, but I really dont know how to do this. This legend should show 3 polygons in 3 different colors and some text right of it. Something like "[red polygon] > 30". I would appreciate any sort of support.

I am working with Geoserver for some weeks now and were able to deploy some services already. For my thematic map (e.g. temperature) I created a custom style displaying all tiles in specific colors (blue, yellow, red). Therefore I want to create a legend, but I really dont know how to do this. This legend should show 3 polygons in 3 different colors and some text right of it. Something like "[red polygon] > 30". I would appreciate any sort of support.

custom style sld:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
    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">
  <NamedLayer>
    <Name>Temperature</Name>
    <UserStyle>
      <Title>My Temperature Style</Title>
      <FeatureTypeStyle>
        <Rule>
            <PolygonSymbolizer>
               <Fill>
                 <CssParameter name="fill">
                   <ogc:Function name="Interpolate">
                     <ogc:PropertyName>dTA</ogc:PropertyName>

                     <ogc:Literal>0</ogc:Literal>
                     <ogc:Literal>#0000ff</ogc:Literal>

                     <ogc:Literal>15</ogc:Literal>
                     <ogc:Literal>#ffff00</ogc:Literal>

                     <ogc:Literal>30</ogc:Literal>
                     <ogc:Literal>#ff0000</ogc:Literal>
                     
                     <ogc:Literal>color</ogc:Literal>
                   </ogc:Function>
                 </CssParameter>
               </Fill>
            </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>
edited body
Source Link
Bera
  • 77.9k
  • 14
  • 78
  • 188
Loading
Source Link
Lukas
  • 203
  • 2
  • 6
Loading