[Geoserver-users] Using non-WellKnownName for PointSymbolizer

Hi,

Is it possible to represent a point feature using some other customized shapes or a picture file or even a font symbol instead of using a WellKnownName as below? If yes, how can it be done? Any tutorials or examples?

<PointSymbolizer>
        <Graphic>
                <Mark>
                       <WellKnownName>circle</WellKnownName>
                       <Fill>
                              <CssParameter name="fill">#ff0000</CssParameter>
                       </Fill>
                </Mark>
                <Size>15.0</Size>
        </Graphic>
</PointSymbolizer>

Thanks in advance.

Regards,
Wai See

[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the message
from your system; please do not copy or use it for any purpose, nor disclose
its contents to any other person. Thank you.]
---ST Electronics Group---


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.24/592 - Release Date: 12/18/2006

It is definitely possible to specify an image in place of the regular shape markings. Here is a snippit of the xsd from the SLD spec:
<xs:element name="Graphic">
    <xs:complexType>
        <xs:sequence>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="sld:ExternalGraphic"/>
                <xs:element ref="sld:Mark"/>
            </xs:choice>
            <xs:sequence>
                <xs:element ref="sld:Opacity" minOccurs="0"/>
                <xs:element ref="sld:Size" minOccurs="0"/>
                <xs:element ref="sld:Rotation" minOccurs="0"/>
            </xs:sequence>
        </xs:sequence>
    </xs:complexType>
</xs:element>
<xs:element name="ExternalGraphic">
    <xs:complexType>
        <xs:sequence>
            <xs:element ref="sld:OnlineResource"/>
            <xs:element ref="sld:Format"/>
        </xs:sequence>
    </xs:complexType>
</xs:element>
<xs:element name="Format" type="xs:string"/>
<xs:element name="Opacity" type="sld:ParameterValueType"/>
<xs:element name="Size" type="sld:ParameterValueType"/>
<xs:element name="Rotation" type="sld:ParameterValueType"/>

So what you need to use is the external graphic tag instead of the mark tag. In that tag there is the 'OnlineResource' which is the url relative to your styles directory in your geoserver installation directory, and the 'format' value which is the type of image file.

Brent Owens
(The Open Planning Project)

Lee Wai See wrote:

Hi,

Is it possible to represent a point feature using some other customized shapes or a picture file or even a font symbol instead of using a WellKnownName as below? If yes, how can it be done? Any tutorials or examples?

<PointSymbolizer>
        <Graphic>
                <Mark>
                       <WellKnownName>circle</WellKnownName>
                       <Fill>
                              <CssParameter name="fill">#ff0000</CssParameter>
                       </Fill>
                </Mark>
                <Size>15.0</Size>
        </Graphic>
</PointSymbolizer>

Thanks in advance.

Regards,
Wai See

[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the message
from your system; please do not copy or use it for any purpose, nor disclose
its contents to any other person. Thank you.]
---ST Electronics Group---

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.24/592 - Release Date: 12/18/2006

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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
------------------------------------------------------------------------

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