Andrea, see inline comments: > Frank Gasdorf ha scritto: > > Hi Andrea, Hello Justin, > > > > I startet writing a test class for the DefaultMapLayer getBounds method. > > Would you agree if we shoud cover the following cases: > > - featureSource.getSchema().getCoordinateReferenceSystem() returns null -> > > returns an empty ReferencedEnvelope > > why empty? in this case I would try to return an envelope without any > crs and have the client side handle the lack of CRS
How to get an envelope if there isn't any CRS information available and the featureSource.getBounds returns null. right now it returns new ReferencedEnvelope(crs) where crs ist null. Maybe the MapLayer interface should be updated that the getBounds Method could return null. Because how is the behavior of all calling classes if a ReferncedEnvelope comes withot any information ? And by the way: Strange code found (trunk and branch 2.5.x) in DefaultMapContext.getLayerBounds() : ... env = layer.getBounds(); sourceCrs = env.getCoordinateReferenceSystem(); if (env == null) { // why check here after env.getCoordinateReferenceSystem() ? continue; } else { ... > > - featureSource.getBounds() returns null -> returns an empty > > ReferencedEnvelope (could be because to expensive for some data sources) > > ok > > > - featureSource.getBounds() returns a ReferencedEnvelope -> return the > > returned ReferencedEnvelope > > ok > > > - featureSource.getSchema().getCoordinateReferenceSystem() returns CRS and > > featureSource.getBounds() returns null -> returns the envelope based on the > > CoordinateReferenceSystem > > hmmm... I don't actually like this behaviour much, but it was already > there, so ok > > Cheers > Andrea > > -- > Andrea Aime > OpenGeo - http://opengeo.org > Expert service straight from the developers. > Cheers, Frank ------------------------------------------------------------------------------ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel