Oups! Sorry. My previous email was sent before I inlined my answers. Tim de Boer a écrit : > Where I'm looking to go is to adopt your classes for all aspects of > coordinates apart from envelope translations. For this I will implement a > CoordinateEnvelopeOperationFactory, similar to your > CoordinateOperationFactory. Is this a good idea? Or is there some sort of > CoordinateOperation I can implement?
It would probably be a good idea to implement you own class for Envelope transformation if you can use more elaborated algorithm that Geotools do. Just transforming the 2 envelope points is usually not enough, since straight lines in the sourceCRS may not be straight lines in the targetCRS. Geotools provides some convenience methods for transforming an Envelope. For example current implementation of: http://javadoc.geotools.fr/snapshot/org/geotools/referencing/CRS.html#transform(org.opengis.referencing.operation.MathTransform,%20org.opengis.spatialschema.geometry.Envelope) actually transforms 8 points for a 2D envelope: the 4 corners, and the middle point on each side. But even this case still an approximation. If we want more accurate result, we would probably need to transform more points. For the 1D --> 3D transformation you talk about, maybe you should just iterates over every points mapped by the 1D CRS and invoke: http://javadoc.geotools.fr/snapshot/org/geotools/geometry/GeneralEnvelope.html#add(org.opengis.spatialschema.geometry.DirectPosition) for each of them. Martin ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
