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 - featureSource.getBounds() returns null -> returns an empty ReferencedEnvelope (could be because to expensive for some data sources) - featureSource.getBounds() returns a ReferencedEnvelope -> return the returned ReferencedEnvelope - featureSource.getSchema().getCoordinateReferenceSystem() returns CRS and featureSource.getBounds() returns null -> returns the envelope based on the CoordinateReferenceSystem
What do you think? I guess it would help as a reference if somebody subclasses and overwrites the getBounds method. Today I have some other stuff on my list but try to post it as soon as possible. Fell free to comment. Cheers, Frank @Justin : Thanks for patcheing the patch, it makes sence to me :) > Justin Deoliveira ha scritto: > > Hi Frank, > > > > I tried applying the patch to 2.5.x, but it causes a failure in the > > shapefile-renderer module. I had to add a check for the case where the > > referenced envelope returned has a null crs, and when it does set it to > > the source crs. > > > > This is not my domain so i am not sure if this is an acceptable fix. > > Although it does fix the test case. Andrea should be able to give us > > thumbs up/down. > > Yeah, the patch works for me, apply at will. The class itself a lot > less, it's screaming for a bloody rewrite. Oh well, waiting for a saint > to sponsor the couple months needed to clean up the rendering module. > > Cheers > Andrea > > -- > Andrea Aime > OpenGeo - http://opengeo.org > Expert service straight from the developers. > ------------------------------------------------------------------------------ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel