Hi,

I encountered an issue when transforming ReferencedEnvelopes between
different CRSs, that because of the floating point operations, sometimes
two transformations that should be an identity transform are having side
effects.

in short, if I have the following referenced envelope:

ReferencedEnvelope coverage = new ReferencedEnvelope(
                                                   -180, 180, -89.9999,
89.9999,
                                                  
DefaultGeographicCRS.WGS84);

and then I have:

CoordinateRererenceSystem crs = CRS.decode("EPSG:900913");
ReferencedEnvelope re = coverage.transform(crs, false);
ReferencedEnvelope rre = re.transform(DefaultGeographicCRS.WGS84, false);


then, the values of 'rre' will be beyond Longitude.MAX_VALUE (it will be
something like 180.000000003), and thus some operations will fail, as
the coordinates are beyond the longitude limits.

is there a way to make sure these transformation, which are based on
valid starting data, end up producing valid data as well?

best regards,


Akos


------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to