Merge "Issue #2528 Fix display of data on somewhat identical projections. Change-Id: Iae186d08e5f9db26f125e784fbba4f9d3d209c26" into omaha_14.2.1
Former-commit-id:4b2981b74f
[formerlyce8d59e075
] [formerlyfae824482b
] [formerly769c56bf08
[formerlyfae824482b
[formerly ddb195c3032b80221e63f21eb113eaab5d50b124]]] Former-commit-id:769c56bf08
Former-commit-id: 3283dd7794029e5cfa8c585c129c8e58899e8c04 [formerly29e24081a6
] Former-commit-id:8434f5cc65
This commit is contained in:
commit
facdf2b779
1 changed files with 9 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue