[Geoserver-devel] [jira] Created: (GEOS-1409) KML thorws NPE and enters big strange loop when Mark has no Fill element

KML thorws NPE and enters big strange loop when Mark has no Fill element
------------------------------------------------------------------------

                 Key: GEOS-1409
                 URL: http://jira.codehaus.org/browse/GEOS-1409
             Project: GeoServer
          Issue Type: Bug
          Components: WMS
    Affects Versions: 1.6.0-beta3, 1.5.3
            Reporter: Andrea Aime
            Assignee: Andrea Aime
            Priority: Critical
             Fix For: 1.5.4, 1.6.0-beta4

If the style contains a Mark without a Fill specification the kml encoder will:
* throw an npe exception
* somehow try to re-encode the style or something like that, because the intentation
   goes on and a file that should be 1MB becomes around 80MB, filled with
   styles within styles within styles up until the end of the file

I guess the proper behaviour is to mimic the renderer: if there is no fill, no symbol is rendered.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

On 10/17/07, Andrea Aime (JIRA) <jira@anonymised.com> wrote:

KML thorws NPE and enters big strange loop when Mark has no Fill element
------------------------------------------------------------------------

                 Key: GEOS-1409
                 URL: http://jira.codehaus.org/browse/GEOS-1409
             Project: GeoServer
          Issue Type: Bug
          Components: WMS
    Affects Versions: 1.6.0-beta3, 1.5.3
            Reporter: Andrea Aime
            Assignee: Andrea Aime
            Priority: Critical
             Fix For: 1.5.4, 1.6.0-beta4

If the style contains a Mark without a Fill specification the kml encoder will:
* throw an npe exception
* somehow try to re-encode the style or something like that, because the intentation
   goes on and a file that should be 1MB becomes around 80MB, filled with
   styles within styles within styles up until the end of the file

I guess the proper behaviour is to mimic the renderer: if there is no fill, no symbol is rendered.

Shouldn't the renderer draw the mark just not filled if no fill is
given (or possibly even use a 50% gray fill) I forget what the default
is but I'm sure it isn't not drawing the mark.

Ian

--

Ian Turton
http://www.geotools.org
http://pennspace.blogspot.com/

Ian Turton ha scritto:

On 10/17/07, Andrea Aime (JIRA) <jira@anonymised.com> wrote:

KML thorws NPE and enters big strange loop when Mark has no Fill element
------------------------------------------------------------------------

                 Key: GEOS-1409
                 URL: http://jira.codehaus.org/browse/GEOS-1409
             Project: GeoServer
          Issue Type: Bug
          Components: WMS
    Affects Versions: 1.6.0-beta3, 1.5.3
            Reporter: Andrea Aime
            Assignee: Andrea Aime
            Priority: Critical
             Fix For: 1.5.4, 1.6.0-beta4

If the style contains a Mark without a Fill specification the kml encoder will:
* throw an npe exception
* somehow try to re-encode the style or something like that, because the intentation
   goes on and a file that should be 1MB becomes around 80MB, filled with
   styles within styles within styles up until the end of the file

I guess the proper behaviour is to mimic the renderer: if there is no fill, no symbol is rendered.

Shouldn't the renderer draw the mark just not filled if no fill is
given (or possibly even use a 50% gray fill) I forget what the default
is but I'm sure it isn't not drawing the mark.

For polygons the specification says to use 50% gray indeed, but it's not so clear on marks. It just states:

---------------------------------------------------------------------------
The WellKnownName element gives the well-known name of the shape of the mark.
Allowed values include at least “square”, “circle”, “triangle”, “star”, “cross”,
and “x”, though map servers may draw a different symbol instead if they don't have a
shape for all of these. The default WellKnownName is “square”. Renderings of these
marks may be made solid or hollow depending on Fill and Stroke elements. These
elements are discussed in Sections 11.2.2 and 11.1.3, respectively.
-------------------------------------------------------------------------

and for fill it states:

------------------------------------------------------------------------
Here, the CssParameter names are “fill” instead of “stroke” and
“fill-opacity” instead of “stroke-opacity”. None of the other CssParameters
in Stroke are available for filling and the default value for the fill color in this context is
50% gray (value “#808080”).
------------------------------------------------------------------------

What puts me off is that "in this context", because fill is not described alone, but as part of the PolygonSymbolizer.
So I'm sure it's 50% gray for a polygon that does not specify fill
(so if I want the polygon to be transparent I need to ask opaque=0
in the fill element?) but I don't really know what applies to
marks.
I can only say that this behaviour, that is, don't fill, has been
like this for at least two years in the streaming renderer (not
that this makes it right, I guess it's just what people have
learned to expect from gt2).

Cheers
Andrea