[Geoserver-users] SLD and PropertyName

Hi

What I want to do is this:

circle

ogc:PropertyNamefillcolor</ogc:PropertyName>

The field “fillcolor” value is a hex color code that comes with “my” SHAPE-file… I can’t get this to work and my guess is that this kind of operation dosen’t work and that I instead have to use some sort of if-statement for every hex code that could exist in the file… Could someone verify this? J

Best regards,

Mårten

Swärd Mårten ha scritto:

Hi

What I want to do is this:

<Mark>

                <WellKnownName>circle</WellKnownName>

                <Fill>

                  <CssParameter name="fill">

                    <ogc:PropertyName>fillcolor</ogc:PropertyName>

                  </CssParameter>

                </Fill>

              </Mark>

The field “fillcolor” value is a hex color code that comes with “my” SHAPE-file.. I can’t get this to work

It should work, but two conditions must be respected:
- fillcolor is exactly the name of your attribute (case matters)
- the attribute contains exactly what you'd type in the css parameter
   otherwise, that is, a "#RRGGBB" string (with the sharp at the
   beginning)

If the latter fails you'll get no error report and the line will stay
black.
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Thanks!
I found what caused the problem, the "fillcolor field" had several spaces after the value. When I removed this the rendering whent as expected.
Thanks again!

//Mårten

-----Ursprungligt meddelande-----
Från: Andrea Aime [mailto:aaime@anonymised.com]
Skickat: den 17 mars 2009 11:12
Till: Swärd Mårten
Kopia: geoserver-users@lists.sourceforge.net
Ämne: Re: [Geoserver-users] SLD and PropertyName

Swärd Mårten ha scritto:

Hi

What I want to do is this:

<Mark>

                <WellKnownName>circle</WellKnownName>

                <Fill>

                  <CssParameter name="fill">

                    <ogc:PropertyName>fillcolor</ogc:PropertyName>

                  </CssParameter>

                </Fill>

              </Mark>

The field "fillcolor" value is a hex color code that comes with "my"
SHAPE-file.. I can't get this to work

It should work, but two conditions must be respected:
- fillcolor is exactly the name of your attribute (case matters)
- the attribute contains exactly what you'd type in the css parameter
   otherwise, that is, a "#RRGGBB" string (with the sharp at the
   beginning)

If the latter fails you'll get no error report and the line will stay
black.
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.