I did a fair bit of QA on making those caches, factories and so on thread
safe. So if you have any trouble please raise an issue.
Internally we try and cache as many of these data structures as possible as
looking them up or creating them can be a performance killer.

Jody Garnett


On Wed, Mar 19, 2014 at 11:13 AM, Sergei Kozyrenko <ser...@faspark.com>wrote:

> I'm using the code like this to get a MathTransform for transforming
> lat,lon points to epsg:3857. Does anyone if resulting MathTransforms
> (ConcatenatedTransformDirect2D, and its inner transforms, AffineTransform2D
> and MercatorPseudoProvider) are thread safe?
>
> CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:4326");
> CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:3857");
> MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS,
> false);
>
> The code above runs only once is already synchronized, but I'm using the
> resulting transform in a servlet and would love not to synchronize each
> time it's accessed.
>
> Thanks,
> Sergei
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to