|
54 | 54 | import org.geotools.geometry.jts.GeometryClipper; |
55 | 55 | import org.geotools.geometry.jts.JTS; |
56 | 56 | import org.geotools.geometry.jts.ReferencedEnvelope; |
| 57 | +import org.geotools.referencing.operation.projection.MapProjection; |
57 | 58 | import org.geotools.referencing.operation.transform.AffineTransform2D; |
58 | 59 | import org.geotools.renderer.lite.RendererUtilities; |
59 | 60 | import org.geotools.resources.coverage.CoverageUtilities; |
@@ -137,6 +138,7 @@ public class RasterDataAdapter implements |
137 | 138 | { |
138 | 139 | static { |
139 | 140 | SourceThresholdFixMosaicDescriptor.register(false); |
| 141 | + MapProjection.SKIP_SANITY_CHECKS = true; |
140 | 142 | } |
141 | 143 |
|
142 | 144 | public final static String TILE_METADATA_PROPERTY_KEY = "TILE_METADATA"; |
@@ -499,14 +501,9 @@ public Iterator<GridCoverage> convertToIndex( |
499 | 501 | final double[] tileRangePerDimension = new double[bounds.getDimensionCount()]; |
500 | 502 | final double[] maxValuesPerDimension = bounds.getMaxValuesPerDimension(); |
501 | 503 | final double[] minValuesPerDimension = bounds.getMinValuesPerDimension(); |
502 | | - double maxSpan = -Double.MAX_VALUE; |
503 | 504 | for (int d = 0; d < tileRangePerDimension.length; d++) { |
504 | 505 | tileRangePerDimension[d] = ((maxValuesPerDimension[d] - minValuesPerDimension[d]) * tileSize) |
505 | 506 | / gridEnvelope.getSpan(d); |
506 | | - |
507 | | - maxSpan = Math.max( |
508 | | - gridEnvelope.getSpan(d), |
509 | | - maxSpan); |
510 | 507 | } |
511 | 508 | final TreeMap<Double, SubStrategy> substrategyMap = new TreeMap<Double, SubStrategy>(); |
512 | 509 | for (final SubStrategy pyramidLevel : indexStrategy.getSubStrategies()) { |
@@ -545,13 +542,7 @@ public Iterator<GridCoverage> convertToIndex( |
545 | 542 | NavigableMap<Double, SubStrategy> map = substrategyMap.tailMap( |
546 | 543 | fullRes, |
547 | 544 | false); |
548 | | - final double toKey = maxSpan / tileSize; |
549 | | - if (map.firstKey() <= toKey) { |
550 | | - map = map.headMap( |
551 | | - toKey, |
552 | | - true); |
553 | | - pyramidLevels.addAll(map.values()); |
554 | | - } |
| 545 | + pyramidLevels.addAll(map.values()); |
555 | 546 | } |
556 | 547 | if (pyramidLevels.isEmpty()) { |
557 | 548 | // this case shouldn't occur theoretically, but just in case, |
|
0 commit comments