Simone Giannecchini a écrit :
> I have a question though. To best use this factory all I need to do is
> CRS.findMathTransform(sourceCRS, targetCRS, lenient);
> 
> each time I need a math transform or it is better if, in case I know I
> ma going to use many transformation over time (GeoServer...) , store a
> BufferedCoordinateOperationFactory  object and reuse that one as much
> as possible?

You don't need to use BufferedCoordinateOperationFactory explicitly, it should 
be used under the hood automatically in the whole Geotools code base, including 
in CRS.findMathTransform(...). However, you may get slightly better performance 
as well as a little bit more configurability with the above code:

class MyClass {
   private final CoordinateOperationFactory opFactory;

   MyClass(Hints hints) {
       opFactory = FactoryFinder.getCoordinateOperationFactory(hints);
   }
}

Note that the factory returned by FactoryFinder should be an instance of 
BufferedCoordinateOperationFactory, unless the user specified explicitly an 
other factory. Note also that the hints argument can be null.

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

Reply via email to