Wonderful, can I ask if you have deprecated the math transform method?
Jody Garnett
On Thu, May 15, 2014 at 5:05 AM, Andrea Aime
<[email protected]>wrote:
> Hi,
> in our existing code base there is a number of places where envelopes
> are being reprojected using the method:
> CRS.transform(mathTransform, envelope)
>
> This method is fine for a class of transformations, such as affine
> transforms
> (extensively used to apply grid to world transforms in rasters) and
> flattening
> transforms (going from a 3d to a 2d envelpe), but it's really bad for
> coordinate system transfromations, as it does not know, unlike
> CRS.transform(envelope, targetCRS) what the source and target CRS are
>
> This information, the nature of source and target CRS, is important to take
> into account singularities such as the poles or the dateline during
> transformation:
> if we don't take those into account we may get incomplete results.
>
> Point in case, think of an envelope in polar stereographics that contains
> the south
> pole, we just transform the points at the border (with densification, or
> not) and
> we'll think that all that was requested was a thin rectangle rather distant
> from the pole, because the points at the border of the envelope are there.
> Instead, the right result has to expand down to the pole, and span all the
> longitudes.
>
> This pull request involved tracking down each and every place where a CRS
> transform was made with the "wrong" method, and made it use the "right"
> one instead
> (the densification during reprojection was alredy implemented when I added
> support
> for the polar stereographic singularities in CRS.transform(envelope,
> targetCRS), previous
> this week):
> https://github.com/geotools/geotools/pull/457
>
> I've also made a similar set of changes in GeoServer:
> https://github.com/geoserver/geoserver/pull/586
>
> If you are maintaining code that does envelope reprojections, I'd suggest
> you have
> a look too.
>
> Anyways... comments welcomed!
>
> Cheers
> Andrea
>
> --
> ==
> Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
> for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39 339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> GeoTools-Devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel