@Test public void testWrappingDisabledHeuristic() throws Exception { ReferencedEnvelope world = new ReferencedEnvelope(-180, 180, -40, 40, WGS84); ReferencedEnvelope mercatorEnvelope = world.transform(MERCATOR, true); mercatorEnvelope.translate(mercatorEnvelope.getWidth() / 2, 0); Geometry g = new WKTReader().read("LINESTRING(-40 20, 190 20)"); Map params = new HashMap(); params.put(WrappingProjectionHandler.DATELINE_WRAPPING_CHECK_ENABLED, false); MathTransform mt = CRS.findMathTransform(WGS84, MERCATOR, true); Geometry reprojected = JTS.transform(g, mt); ProjectionHandler handler = ProjectionHandlerFinder.getHandler(mercatorEnvelope, WGS84, true, params); Geometry processed = handler.postProcess(mt, reprojected); assertEquals(processed.getGeometryN(0), reprojected); params.put(WrappingProjectionHandler.DATELINE_WRAPPING_CHECK_ENABLED, true); handler = ProjectionHandlerFinder.getHandler(mercatorEnvelope, WGS84, true, params); processed = handler.postProcess(mt, reprojected); assertNotEquals(processed.getGeometryN(0), reprojected); }
public Geometry postProcess(MathTransform mt, Geometry geometry) { return geometry; }
ProjectionHandler { public Geometry postProcess(MathTransform mt, Geometry geometry) { return geometry; } }
ProjectionHandler { public Geometry postProcess(MathTransform mt, Geometry geometry) { return geometry; } ProjectionHandler(
            CoordinateReferenceSystem sourceCRS,
            Envelope validAreaBounds,
            ReferencedEnvelope renderingEnvelope);  ProjectionHandler(
            CoordinateReferenceSystem sourceCRS,
            Geometry validArea,
            ReferencedEnvelope renderingEnvelope); }
ProjectionHandler { public Geometry postProcess(MathTransform mt, Geometry geometry) { return geometry; } ProjectionHandler(
            CoordinateReferenceSystem sourceCRS,
            Envelope validAreaBounds,
            ReferencedEnvelope renderingEnvelope);  ProjectionHandler(
            CoordinateReferenceSystem sourceCRS,
            Geometry validArea,
            ReferencedEnvelope renderingEnvelope); void setProjectionParameters(Map projectionParameters); ReferencedEnvelope getRenderingEnvelope(); CoordinateReferenceSystem getSourceCRS(); List<ReferencedEnvelope> getQueryEnvelopes(); ReferencedEnvelope getProjectedEnvelope(
            ReferencedEnvelope envelope, CoordinateReferenceSystem targetCRS); boolean requiresProcessing(Geometry geometry); Geometry preProcess(Geometry geometry); MathTransform getRenderingTransform(MathTransform mt); Geometry postProcess(MathTransform mt, Geometry geometry); ReferencedEnvelope getValidAreaBounds(); }
ProjectionHandler { public Geometry postProcess(MathTransform mt, Geometry geometry) { return geometry; } ProjectionHandler(
            CoordinateReferenceSystem sourceCRS,
            Envelope validAreaBounds,
            ReferencedEnvelope renderingEnvelope);  ProjectionHandler(
            CoordinateReferenceSystem sourceCRS,
            Geometry validArea,
            ReferencedEnvelope renderingEnvelope); void setProjectionParameters(Map projectionParameters); ReferencedEnvelope getRenderingEnvelope(); CoordinateReferenceSystem getSourceCRS(); List<ReferencedEnvelope> getQueryEnvelopes(); ReferencedEnvelope getProjectedEnvelope(
            ReferencedEnvelope envelope, CoordinateReferenceSystem targetCRS); boolean requiresProcessing(Geometry geometry); Geometry preProcess(Geometry geometry); MathTransform getRenderingTransform(MathTransform mt); Geometry postProcess(MathTransform mt, Geometry geometry); ReferencedEnvelope getValidAreaBounds(); static final String ADVANCED_PROJECTION_DENSIFY; }