Package org.geotools.renderer.crs
Class WrappingProjectionHandler
- Object
- 
- ProjectionHandler
- 
- WrappingProjectionHandler
 
 
- 
 public class WrappingProjectionHandler extends ProjectionHandler AProjectionHandlerfor 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 SummaryFields Modifier and Type Field Description static doubleDATELINE_PROXIMITY_TOLERANCEThe tolerance to consider a geometry without touching both datelines.static StringDATELINE_WRAPPING_CHECK_ENABLEDprotected static StringPREFLIPPED_OBJECTThe user data key to indicate that the geometry was pre-flipped- 
Fields inherited from class ProjectionHandlerADVANCED_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 SummaryConstructors Constructor Description WrappingProjectionHandler(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 SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisDatelineWrappingCheckEnabled()GeometrypostProcess(MathTransform mt, Geometry geometry)Processes the geometry already projected to the target SRS.GeometrypreProcess(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 ProjectionHandleraccumulateTransforms, addGeometries, computeDatelineX, concatenateTransforms, densify, getProjectedEnvelope, getQueryEnvelopes, getRenderingEnvelope, getRenderingTransform, getSourceCRS, getSourceEnvelopes, getValidArea, getValidAreaBounds, intersect, mergeEnvelopes, reprojectEnvelopes, setCentralMeridian, transformEnvelope
 
- 
 
- 
- 
- 
Field Detail- 
PREFLIPPED_OBJECTprotected static final String PREFLIPPED_OBJECT The user data key to indicate that the geometry was pre-flipped- See Also:
- Constant Field Values
 
 - 
DATELINE_PROXIMITY_TOLERANCEpublic static final double DATELINE_PROXIMITY_TOLERANCE The 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:
- Constant Field Values
 
 - 
DATELINE_WRAPPING_CHECK_ENABLEDpublic static final String DATELINE_WRAPPING_CHECK_ENABLED - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
WrappingProjectionHandlerpublic 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 Detail- 
setProjectionParameterspublic void setProjectionParameters(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)- Overrides:
- setProjectionParametersin class- ProjectionHandler
 
 - 
preProcesspublic Geometry preProcess(Geometry geometry) throws TransformException, FactoryException 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 class- ProjectionHandler
- Throws:
- TransformException
- FactoryException
 
 - 
postProcesspublic Geometry postProcess(MathTransform mt, Geometry geometry) 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 class- ProjectionHandler
- Parameters:
- mt- optional reverse transformation to facilitate unwrapping
 
 - 
requiresProcessingpublic boolean requiresProcessing(Geometry geometry) Description copied from class:ProjectionHandlerReturns true if the geometry needs special handling- Overrides:
- requiresProcessingin class- ProjectionHandler
 
 - 
isDatelineWrappingCheckEnabledpublic boolean isDatelineWrappingCheckEnabled() 
 - 
setDatelineWrappingCheckEnabledpublic 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
 
- 
 
-