org.geotools.renderer.crs
Class ProjectionHandler

java.lang.Object
  extended by org.geotools.renderer.crs.ProjectionHandler
Direct Known Subclasses:
WrappingProjectionHandler

public class ProjectionHandler
extends java.lang.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 java.util.logging.Logger LOGGER
           
 
Constructor Summary
ProjectionHandler(ReferencedEnvelope renderingEnvelope, ReferencedEnvelope validArea)
           
 
Method Summary
 java.util.List<ReferencedEnvelope> getQueryEnvelopes(org.opengis.referencing.crs.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
 com.vividsolutions.jts.geom.Geometry postProcess(com.vividsolutions.jts.geom.Geometry geometry)
          Processes the geometry already projected to the target SRS.
 com.vividsolutions.jts.geom.Geometry preProcess(org.opengis.referencing.crs.CoordinateReferenceSystem geomCRS, com.vividsolutions.jts.geom.Geometry geometry)
          Pre processes the geometry, e.g.
 boolean requiresProcessing(org.opengis.referencing.crs.CoordinateReferenceSystem geomCRS, com.vividsolutions.jts.geom.Geometry geometry)
          Returns true if the geometry needs special handling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final java.util.logging.Logger LOGGER
Constructor Detail

ProjectionHandler

public ProjectionHandler(ReferencedEnvelope renderingEnvelope,
                         ReferencedEnvelope validArea)
Method Detail

getQueryEnvelopes

public java.util.List<ReferencedEnvelope> getQueryEnvelopes(org.opengis.referencing.crs.CoordinateReferenceSystem queryCRS)
                                                     throws org.opengis.referencing.operation.TransformException,
                                                            org.opengis.referencing.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:
org.opengis.referencing.operation.TransformException
org.opengis.referencing.FactoryException

requiresProcessing

public boolean requiresProcessing(org.opengis.referencing.crs.CoordinateReferenceSystem geomCRS,
                                  com.vividsolutions.jts.geom.Geometry geometry)
Returns true if the geometry needs special handling


preProcess

public com.vividsolutions.jts.geom.Geometry preProcess(org.opengis.referencing.crs.CoordinateReferenceSystem geomCRS,
                                                       com.vividsolutions.jts.geom.Geometry geometry)
                                                throws org.opengis.referencing.operation.TransformException,
                                                       org.opengis.referencing.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:
org.opengis.referencing.operation.TransformException
org.opengis.referencing.FactoryException

postProcess

public com.vividsolutions.jts.geom.Geometry postProcess(com.vividsolutions.jts.geom.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.