[Geoserver-users] Featurestyles for different Points-of-Interests

Hi Geoserver Community,

after a warming-up phase setting up geoserver we are currently styling our maps.

All the feature data is provided by TeleAtlas Multinet. So we have plenty of work with different layers.

One interesting shape file is the POI points of interests. It consists of elements such as churches, petrol stations and even parks (green zones).

How can I give the green parks another appearance in the map (=green area) as the petrol stations (symbol) or churches (another symbol)? They are all shown as same type of points/rectangles but I want to highligt just the petrol stations…

Can it be done in the featuretype / SLD editor?
Where do I find a tutorial / how to / example for this?

Br & any help is highly appreciated.
Klemens

Dubai | Abu Dhabi

Hi Klemens,

Unfortunately there are no great tools for creating SLD's, there are some folks here that are working on a web based SLD editor but its still in the works.

You can try out uDig, it has a decent SLD editor. However, you might be better off just editing the SLD file directly, there is a basic text editor in the geoserver user interface that will allow you to do this.

As for styling the different points differently, i assume there is some attribute in your data set that identifies the type of POI (I called it "TYPE" in the example below).

What you need to do is create 3 Rules inside of a FeatureTypeStyle. Each rule will define a Filter which specifies the type, and then the specific style for that type. Here is an example:

<FeatureTypeStyle>
  <Rule>
    <Title>Parks</Title>
    <ogc:Filter>
      <PropertyIsEqualTo>
       <Property>TYPE</Property>
       <Literal>PARK</Literal>
      </PropertyIsEqualTo>
    </ogc:Filter>
    <PointSymbolizer>
     <Graphic>
      <Mark>
       <Fill><CssParamter name="fill">##00FF00</CssParameter></Fill>
      </Mark>
     </Graphic>
    </PointSymbolizer>
  </Rule>
  <Rule>
    <Title>Gas Stations</Title>
    <ogc:Filter>
      <PropertyIsEqualTo>
       <Property>TYPE</Property>
       <Literal>GASSTATION</Literal>
      </PropertyIsEqualTo>
    </ogc:Filter>
    <PointSymbolizer>
     <Graphic>
      <ExternalGraphic>
       <OnlineSource xlink:type="simple" xlink:href="gas.jpg"/>
       <Format>image/jpeg</Format>
      </ExternalGraphic>
     </Graphic>
    </PointSymbolizer>
  </Rule
  <Rule>
    <Title>Churches</Title>
    <!-- similar to gas stations -->
  </Rule>

</FeatureTypeStyle>

Hope that helps,

-Justin

Klemens Häusler wrote:

Hi Geoserver Community,

after a warming-up phase setting up geoserver we are currently styling our maps.

All the feature data is provided by TeleAtlas Multinet. So we have plenty of work with different layers.

One interesting shape file is the POI points of interests. It consists of elements such as churches, petrol stations and even parks (green zones).

How can I give the green parks another appearance in the map (=green area) as the petrol stations (symbol) or churches (another symbol)? They are all shown as same type of points/rectangles but I want to highligt just the petrol stations...

Can it be done in the featuretype / SLD editor?
Where do I find a tutorial / how to / example for this?

Br & any help is highly appreciated.
Klemens

Dubai | Abu Dhabi

!DSPAM:4007,488046b134761015089218!

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

!DSPAM:4007,488046b134761015089218!

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,488046b134761015089218!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com