DefaultFeatureCollection.getBounds() returns ReferencedEnvelope with null CRS
-----------------------------------------------------------------------------

                 Key: GEOT-2351
                 URL: http://jira.codehaus.org/browse/GEOT-2351
             Project: GeoTools
          Issue Type: Bug
    Affects Versions: 2.5.3
            Reporter: Norman Fomferra


DefaultFeatureCollection.getBounds() returns a ReferencedEnvelope with null 
CRS. (The API doc ReferencedEnvelope does not specify that this is a valid 
state.)  If this envelope is used in StreamingRenderer.paint() as mapArea, then 
an NPE will be thrown.

In org.geotools.feature.DefaultFeatureCollection we see:

    public ReferencedEnvelope getBounds() {
        if (bounds == null) {
            bounds = new ReferencedEnvelope();    // No CRS!
        ...
     }

In org.geotools.feature.simple.SimpleFeatureImpl we correctly see:

    public BoundingBox getBounds() {
        ReferencedEnvelope bounds = new ReferencedEnvelope( 
featureType.getCoordinateReferenceSystem() );
        ...
     }


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

        

------------------------------------------------------------------------------
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
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to