org.geotools.renderer.shape
Class GeometryHandlerUtilities

java.lang.Object
  extended by org.geotools.renderer.shape.GeometryHandlerUtilities

public class GeometryHandlerUtilities
extends java.lang.Object

Useful methods common to all geometry handlers

Since:
2.1.x
Author:
jeichar

Constructor Summary
GeometryHandlerUtilities()
           
 
Method Summary
static ScreenMap calculateScreenSize(java.awt.Rectangle screenSize, boolean hasOpacity)
           
static java.awt.geom.Point2D calculateSpan(org.opengis.referencing.operation.MathTransform mt, int x, int y)
          calculates the distance between the centers of the two pixels at x,y
static com.vividsolutions.jts.geom.Envelope readBounds(java.nio.ByteBuffer buffer)
          DOCUMENT ME!
static void transform(ShapeType type, org.opengis.referencing.operation.MathTransform mt, double[] src, double[] dest, int numPoints)
          Applies the specied transformation to the points in src, dropping the transformed points in dest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryHandlerUtilities

public GeometryHandlerUtilities()
Method Detail

readBounds

public static com.vividsolutions.jts.geom.Envelope readBounds(java.nio.ByteBuffer buffer)
DOCUMENT ME!

Parameters:
buffer -
Returns:

transform

public static void transform(ShapeType type,
                             org.opengis.referencing.operation.MathTransform mt,
                             double[] src,
                             double[] dest,
                             int numPoints)
                      throws org.opengis.referencing.operation.TransformException
Applies the specied transformation to the points in src, dropping the transformed points in dest. In case of transformation failure, it skips the points were the transformation failed.

Parameters:
type -
mt -
src -
dest -
Throws:
org.opengis.referencing.operation.TransformException

calculateSpan

public static java.awt.geom.Point2D calculateSpan(org.opengis.referencing.operation.MathTransform mt,
                                                  int x,
                                                  int y)
                                           throws org.opengis.referencing.operation.NoninvertibleTransformException,
                                                  org.opengis.referencing.operation.TransformException
calculates the distance between the centers of the two pixels at x,y

Parameters:
mt - the transform to use to calculate the centers.
x - the x coordinate at which to make the calculation
y - the y coordinate at which to make the calculation
Returns:
a point whose x coord it the distance in world coordinates between x-0.5 and x+0.5 and the y is the span around the y point.
Throws:
org.opengis.referencing.operation.NoninvertibleTransformException
org.opengis.referencing.operation.TransformException

calculateScreenSize

public static ScreenMap calculateScreenSize(java.awt.Rectangle screenSize,
                                            boolean hasOpacity)
                                     throws org.opengis.referencing.operation.TransformException,
                                            org.opengis.referencing.operation.NoninvertibleTransformException
Throws:
org.opengis.referencing.operation.TransformException
org.opengis.referencing.operation.NoninvertibleTransformException


Copyright © 1996-2010 Geotools. All Rights Reserved.