On Mon, Jun 6, 2011 at 2:34 AM, Jody Garnett <[email protected]> wrote: > Opinions, suggestions? (someone burning to do this work > in my place or feeling like helping out?) :-p > > I also note that RefernecedEnvelope is the major sticking point keeping > gt-api and gt-opengis in two separate modules - it depends on the CRS > utility class forcing gt-api to always depend on gt-referencing. > I got one alternative solution here .. not sure if I like it; but it is > "more correct" so I may as well share. > Part of the trouble is the direct use of GeneralEnvelope. Back when I was > working on gt-geometry one of the major roadblocks was the gt-referencing > (and gt-coverage) modules not taking their own medicine. They were > implementing factories for others to use; but not making use of a geometry > factory for their own internal creation of Envelope and Point. > So here is the alternative fix: > - if I make a cut down geometry factory that just has the methods for what > we use > - gt-referencingt provides an implementation that builds GeneralEnvelope > when code asks for an Envelope > - update code that calls new GeneralEnvelope to call the factory > - update the 65 references to use the Envelope.transform( targetCRS) method > rather than CRS.transform( envelope, target )
The method you're referring to does not exist: http://svn.osgeo.org/geotools/trunk/modules/library/opengis/src/main/java/org/opengis/geometry/Envelope.java It's not there in Envelope, nor in GeneralEnvelope (thought it would be nice to have it there) For reference the ReferencedEnvelope transformation methods are not part of any interface and have more parameters, to control bursa-wolf missing params leniency and number of densification points: public ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS, boolean lenient) public ReferencedEnvelope transform(final CoordinateReferenceSystem targetCRS, final boolean lenient, final int numPointsForTransformation) Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
