[Geoserver-users] Database-driven Styling problem

I'm following the example here:

http://geoserver.org/display/GEOSDOC/SLD+Snippets#SLDSnippets-DatabasedrivenStyling

But my polygons are being drawn with no colors (think wire-frame).

Where should I look to start to debug my problem?

I turned up the logging but I didn't see anything there.

Thanks in advance,
Rob

MrR08040 wrote:

I'm following the example here:

http://geoserver.org/display/GEOSDOC/SLD+Snippets#SLDSnippets-DatabasedrivenStyling

But my polygons are being drawn with no colors (think wire-frame).

Where should I look to start to debug my problem?

Well, what is the actual content of your table? The property you use
for "fill" should be a string and look like '#FF0000' for red, and so
on. If you have anything that does not follow the '#RRGGBB' pattern
the conversion from string to color will fail and you'll get no fill.

Cheers
Andrea

On Wed, Feb 25, 2009 at 11:08 AM, Andrea Aime <aaime@anonymised.com> wrote:

Well, what is the actual content of your table? The property you use
for "fill" should be a string and look like '#FF0000' for red, and so
on. If you have anything that does not follow the '#RRGGBB' pattern
the conversion from string to color will fail and you'll get no fill.

Yes, that's what I have in the table. Does it matter that the type is
for that column? And are the hex chars case sensitive? Should I be
seeing something about a failure in the log?

Many thanks,
Rob

MrR08040 wrote:

I'm following the example here:

http://geoserver.org/display/GEOSDOC/SLD+Snippets#SLDSnippets-DatabasedrivenStyling

But my polygons are being drawn with no colors (think wire-frame).

Where should I look to start to debug my problem?

Well, what is the actual content of your table? The property you use
for "fill" should be a string and look like '#FF0000' for red, and so
on. If you have anything that does not follow the '#RRGGBB' pattern
the conversion from string to color will fail and you'll get no fill.

Cheers
Andrea

Rob Light wrote:

On Wed, Feb 25, 2009 at 11:08 AM, Andrea Aime <aaime@anonymised.com> wrote:

Well, what is the actual content of your table? The property you use
for "fill" should be a string and look like '#FF0000' for red, and so
on. If you have anything that does not follow the '#RRGGBB' pattern
the conversion from string to color will fail and you'll get no fill.

Yes, that's what I have in the table. Does it matter that the type is
for that column?

Not really, should be a string.

And are the hex chars case sensitive?

Not as far as I know. Are you sure the attribute name matches? (that's
case sensitive)

Should I be seeing something about a failure in the log?

Nope, there is no logging for type conversion failures, if the conversion succeeds, we fill, otherwise, it's transparent.

Can you share a data + sld combo for us to test?

Cheers
Andrea

Hi,

can I just jump in with one similar bug/issue that i noticed using
attribs from database:

If the attributes in database are numbers, and you want them to
represent ExternalGraphic like this ${status}.png
<PointSymbolizer>
            <Graphic>
              <ExternalGraphic>
                <OnlineResource xlink:type="simple"
xlink:href="${status}.png" />
                <Format>image/png</Format>
              </ExternalGraphic>
              <Size>
                <ogc:Literal>26</ogc:Literal>
              </Size>
            </Graphic>
          </PointSymbolizer>

it wont work, but if you prepend some string in front of it -
"symbol_${status}.png" - it works :slight_smile:

<PointSymbolizer>
            <Graphic>
              <ExternalGraphic>
                <OnlineResource xlink:type="simple"
xlink:href="symbol_${status}.png" />
                <Format>image/png</Format>
              </ExternalGraphic>
              <Size>
                <ogc:Literal>26</ogc:Literal>
              </Size>
            </Graphic>
          </PointSymbolizer>

Hope it helps,

cheers!

On Wed, Feb 25, 2009 at 5:41 PM, Andrea Aime <aaime@anonymised.com> wrote:

Rob Light wrote:

On Wed, Feb 25, 2009 at 11:08 AM, Andrea Aime <aaime@anonymised.com> wrote:

Well, what is the actual content of your table? The property you use
for "fill" should be a string and look like '#FF0000' for red, and so
on. If you have anything that does not follow the '#RRGGBB' pattern
the conversion from string to color will fail and you'll get no fill.

Yes, that's what I have in the table. Does it matter that the type is
for that column?

Not really, should be a string.

And are the hex chars case sensitive?

Not as far as I know. Are you sure the attribute name matches? (that's
case sensitive)

Should I be seeing something about a failure in the log?

Nope, there is no logging for type conversion failures, if the
conversion succeeds, we fill, otherwise, it's transparent.

Can you share a data + sld combo for us to test?

Cheers
Andrea

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ivan Grcic