Bounding box query when specifying property name fails for complex features
---------------------------------------------------------------------------

                 Key: GEOT-2827
                 URL: http://jira.codehaus.org/browse/GEOT-2827
             Project: GeoTools
          Issue Type: Bug
          Components: core filter
            Reporter: Rini Angreani
             Fix For: 2.7-M0
         Attachments: filterfactoryimpl.patch

In complex features, namespaces are used for the property names, eg:

wfs?request=GetFeature&typeName=gsml:MappedFeature&propertyName=gsml:shape&bbox=132,-27,133,-26
 

This fails, because in FilterFactoryImpl, it resets the property name and loses 
the namespace information.
I removed line 311 in this method, since it did the damage, and it's redundant.
    
public BBOX bbox(Expression e, double minx, double miny, double maxx, double 
maxy, String srs) {
        
        PropertyName name = null;
        if ( e instanceof PropertyName ) {
            name = (PropertyName) e;
        }
        else {
            throw new IllegalArgumentException();
        }
        
        BBoxExpression bbox = null;
        try {
            bbox = createBBoxExpression(new Envelope(minx,maxx,miny,maxy));
        } 
        catch (IllegalFilterException ife) {
            new IllegalArgumentException().initCause(ife);
        }
        
        BBOXImpl box = new BBOXImpl(this,e,bbox);

>>> removed >>>    box.setPropertyName( name.getPropertyName() );

By passing name.getPropertyName() as String, it loses the namespace hints from 
the PropertyName name. 
It also doesn't make sense to set property name (expression1) again because 
it's already passed in through BBoxImpl constructor as e. If you look higher, 
name = e. 

My test in gt-app-schema now passes (not yet committed obviously). 



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

        

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to