Package org.geotools.renderer.crs
Class WrappingProjectionHandler
Object
ProjectionHandler
WrappingProjectionHandler
A
ProjectionHandler for projections that do warp in the East/West direction, it will replicate the geometries
generating a Google Maps like effect- Author:
- Andrea Aime - OpenGeo
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe tolerance to consider a geometry without touching both datelines.static final Stringprotected static final StringThe user data key to indicate that the geometry was pre-flippedFields inherited from class ProjectionHandler
ADVANCED_PROJECTION_DENSIFY, datelineX, DEFAULT_DENSIFICATION_LIMIT, DENSIFICATION_LIMIT_KEY, densify, EPS, geometryCRS, LOGGER, noReprojection, queryAcrossDateline, renderingEnvelope, sourceAxisOrder, sourceCRS, targetAxisOrder, targetCRS, targetHalfCircle, validaAreaTester, validArea, validAreaBounds -
Constructor Summary
ConstructorsConstructorDescriptionWrappingProjectionHandler(ReferencedEnvelope renderingEnvelope, ReferencedEnvelope validArea, CoordinateReferenceSystem sourceCrs, double centralMeridian, int maxWraps) Provides the strategy with the area we want to render and its CRS (the SPI lookup will do this step) -
Method Summary
Modifier and TypeMethodDescriptionbooleanpostProcess(MathTransform mt, Geometry geometry) Processes the geometry already projected to the target SRS.preProcess(Geometry geometry) Pre processes the geometry, e.g. cuts it, splits it, etc. in its native srs.booleanrequiresProcessing(Geometry geometry) Returns true if the geometry needs special handlingvoidsetDatelineWrappingCheckEnabled(boolean datelineWrappingCheckEnabled) Enables the check using the "half world" heuristic on the input geometries, if larger it assumes they spanned the dateline.voidsetProjectionParameters(Map<String, Object> projectionParameters) Set one of the supported projection parameters: - datelineWrappingCheckEnabled (boolean) if false disables the heuristic for dateline wrapping check (true by default)Methods inherited from class ProjectionHandler
accumulateTransforms, addGeometries, computeDatelineX, concatenateTransforms, densify, getProjectedEnvelope, getQueryEnvelopes, getRenderingEnvelope, getRenderingTransform, getSourceCRS, getSourceEnvelopes, getValidArea, getValidAreaBounds, intersect, mergeEnvelopes, reprojectEnvelopes, setCentralMeridian, transformEnvelope
-
Field Details
-
PREFLIPPED_OBJECT
The user data key to indicate that the geometry was pre-flipped- See Also:
-
DATELINE_PROXIMITY_TOLERANCE
public static final double DATELINE_PROXIMITY_TOLERANCEThe tolerance to consider a geometry without touching both datelines. Derived using trial and error. Any smaller and Antarctica-like polygons are incorrectly tagged.- See Also:
-
DATELINE_WRAPPING_CHECK_ENABLED
- See Also:
-
-
Constructor Details
-
WrappingProjectionHandler
public WrappingProjectionHandler(ReferencedEnvelope renderingEnvelope, ReferencedEnvelope validArea, CoordinateReferenceSystem sourceCrs, double centralMeridian, int maxWraps) throws FactoryException Provides the strategy with the area we want to render and its CRS (the SPI lookup will do this step)- Throws:
FactoryException
-
-
Method Details
-
setProjectionParameters
Set one of the supported projection parameters: - datelineWrappingCheckEnabled (boolean) if false disables the heuristic for dateline wrapping check (true by default)- Overrides:
setProjectionParametersin classProjectionHandler
-
preProcess
Description copied from class:ProjectionHandlerPre processes the geometry, e.g. cuts it, splits it, etc. in its native srs. May return null if the geometry is not to be drawn- Overrides:
preProcessin classProjectionHandler- Throws:
TransformExceptionFactoryException
-
postProcess
Description copied from class:ProjectionHandlerProcesses the geometry already projected to the target SRS. May return null if the geometry is not to be drawn.- Overrides:
postProcessin classProjectionHandler- Parameters:
mt- optional reverse transformation to facilitate unwrapping
-
requiresProcessing
Description copied from class:ProjectionHandlerReturns true if the geometry needs special handling- Overrides:
requiresProcessingin classProjectionHandler
-
isDatelineWrappingCheckEnabled
public boolean isDatelineWrappingCheckEnabled() -
setDatelineWrappingCheckEnabled
public void setDatelineWrappingCheckEnabled(boolean datelineWrappingCheckEnabled) Enables the check using the "half world" heuristic on the input geometries, if larger it assumes they spanned the dateline. Enabled by default
-