Merge "Issue #2528 Fix display of data on somewhat identical projections. Change-Id: Iae186d08e5f9db26f125e784fbba4f9d3d209c26" into omaha_14.2.1

Former-commit-id: 4b2981b74f [formerly ce8d59e075] [formerly fae824482b] [formerly 769c56bf08 [formerly fae824482b [formerly ddb195c3032b80221e63f21eb113eaab5d50b124]]]
Former-commit-id: 769c56bf08
Former-commit-id: 3283dd7794029e5cfa8c585c129c8e58899e8c04 [formerly 29e24081a6]
Former-commit-id: 8434f5cc65
This commit is contained in:
Ron Anderson 2014-02-17 08:56:48 -06:00 committed by Gerrit Code Review
commit facdf2b779

View file

@ -92,6 +92,15 @@ public class EnvelopeIntersection {
sourceREnvelope.getCoordinateReferenceSystem(),
targetREnvelope.getCoordinateReferenceSystem());
if (sourceCRSToTargetCRS.isIdentity()) {
/*
* Referenced envelope will only perform an intersection if the CRSs
* are identical. However it is possible to get an identity math
* transform with slight variences in the object types of the CRSs.
* This is known to happen on Equidistant Cylindrical projections.
* To get around this force the source envelope into the target CRS.
*/
sourceREnvelope = new ReferencedEnvelope(sourceREnvelope,
targetREnvelope.getCoordinateReferenceSystem());
com.vividsolutions.jts.geom.Envelope intersection = sourceREnvelope
.intersection(targetREnvelope);
if (intersection == null) {