GMLFilterFeature gets confused by multipoints
---------------------------------------------

         Key: GEOT-809
         URL: http://jira.codehaus.org/browse/GEOT-809
     Project: GeoTools
        Type: Bug

  Components: main  
    Versions: 2.2-RC0    
    Reporter: Ilja Preuß
 Assigned to: James Macgill 
 Attachments: multipoint-patch.txt

Mutlipoint-Features parsed using org.geotools.gml.GMLFilterFeature don't any 
attributes.

The lines

        // if it ends with Member we'll assume it's a feature for the time being
        // nasty hack to fix members of multi lines and polygons
        if (localName.endsWith("Member") && !localName.endsWith("StringMember")
                && !localName.endsWith("polygonMember")) {

in both the startElement and endElement method don't account for "pointMember".

As a consequence, when startElement encounters a pointMember inside a 
multipoint, it will override all already existing attributes, and endElement 
will set the insideFeature flag to false - leading to every multipoint having 
an empty attribute set.

The attached patch fixes this problem by extracting the duplicated expression 
to a method and, additionally to "StringMember" and "polygonMember", also 
checking for "pointMember".

-- 
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



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to