org.geotools.renderer.crs
Class ProjectionHandler

Object
  extended by ProjectionHandler
Direct Known Subclasses:
WrappingProjectionHandler

public class ProjectionHandler
extends Object

A class that can perform transformations on geometries to handle the singularity of the rendering CRS, deal with geometries that are crossing the dateline, and eventually wrap them around to produce a seamless continuous map effect.

This basic implementation will cut the geometries that get outside of the area of validity of the projection (as provided by the constructor) WARNING: this API is not finalized and is meant to be used by StreamingRenderer only

Author:
Andrea Aime - OpenGeo

Field Summary
protected static Logger LOGGER
           
 
Constructor Summary
ProjectionHandler(ReferencedEnvelope renderingEnvelope, ReferencedEnvelope validArea)
           
 
Method Summary
 List<ReferencedEnvelope> getQueryEnvelopes(CoordinateReferenceSystem queryCRS)
          Returns a set of envelopes that will be used to query the data given the specified rendering envelope and the current query envelope
 Geometry postProcess(Geometry geometry)
          Processes the geometry already projected to the target SRS.
 Geometry preProcess(CoordinateReferenceSystem geomCRS, Geometry geometry)
          Pre processes the geometry, e.g. cuts it, splits it, etc. in its native srs.
 boolean requiresProcessing(CoordinateReferenceSystem geomCRS, Geometry geometry)
          Returns true if the geometry needs special handling
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final Logger LOGGER
Constructor Detail

ProjectionHandler

public ProjectionHandler(ReferencedEnvelope renderingEnvelope,
                         ReferencedEnvelope validArea)
Method Detail

getQueryEnvelopes

public List<ReferencedEnvelope> getQueryEnvelopes(CoordinateReferenceSystem queryCRS)
                                           throws TransformException,
                                                  FactoryException
Returns a set of envelopes that will be used to query the data given the specified rendering envelope and the current query envelope

Throws:
TransformException
FactoryException

requiresProcessing

public boolean requiresProcessing(CoordinateReferenceSystem geomCRS,
                                  Geometry geometry)
Returns true if the geometry needs special handling


preProcess

public Geometry preProcess(CoordinateReferenceSystem geomCRS,
                           Geometry geometry)
                    throws TransformException,
                           FactoryException
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

Throws:
TransformException
FactoryException

postProcess

public Geometry postProcess(Geometry geometry)
Processes the geometry already projected to the target SRS. May return null if the geometry is not to be drawn



Copyright © 1996-2010 Geotools. All Rights Reserved.