Class WrappingProjectionHandler

Object
ProjectionHandler
WrappingProjectionHandler

public class WrappingProjectionHandler extends ProjectionHandler
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 Details

    • PREFLIPPED_OBJECT

      protected static final String 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_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:
    • DATELINE_WRAPPING_CHECK_ENABLED

      public static final String DATELINE_WRAPPING_CHECK_ENABLED
      See Also:
  • Constructor Details

  • Method Details

    • setProjectionParameters

      public 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:
      setProjectionParameters in class ProjectionHandler
    • preProcess

      public Geometry preProcess(Geometry geometry) throws TransformException, FactoryException
      Description copied from class: ProjectionHandler
      Pre 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:
      preProcess in class ProjectionHandler
      Throws:
      TransformException
      FactoryException
    • postProcess

      public Geometry postProcess(MathTransform mt, Geometry geometry)
      Description copied from class: ProjectionHandler
      Processes the geometry already projected to the target SRS. May return null if the geometry is not to be drawn.
      Overrides:
      postProcess in class ProjectionHandler
      Parameters:
      mt - optional reverse transformation to facilitate unwrapping
    • requiresProcessing

      public boolean requiresProcessing(Geometry geometry)
      Description copied from class: ProjectionHandler
      Returns true if the geometry needs special handling
      Overrides:
      requiresProcessing in class ProjectionHandler
    • 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