org.geotools.renderer.shape
Class GeometryHandlerUtilities

Object
  extended by GeometryHandlerUtilities

public class GeometryHandlerUtilities
extends Object

Useful methods common to all geometry handlers

Since:
2.1.x
Author:
jeichar
Module:

Constructor Summary
GeometryHandlerUtilities()
           
 
Method Summary
static ScreenMap calculateScreenSize(Rectangle screenSize, boolean hasOpacity)
           
static Point2D calculateSpan(MathTransform mt, int x, int y)
          calculates the distance between the centers of the two pixels at x,y
static Envelope readBounds(ByteBuffer buffer)
          DOCUMENT ME!
static void transform(ShapeType type, 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryHandlerUtilities

public GeometryHandlerUtilities()
Method Detail

readBounds

public static Envelope readBounds(ByteBuffer buffer)
DOCUMENT ME!

Parameters:
buffer -
Returns:

transform

public static void transform(ShapeType type,
                             MathTransform mt,
                             double[] src,
                             double[] dest,
                             int numPoints)
                      throws 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:
TransformException

calculateSpan

public static Point2D calculateSpan(MathTransform mt,
                                    int x,
                                    int y)
                             throws NoninvertibleTransformException,
                                    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:
NoninvertibleTransformException
TransformException

calculateScreenSize

public static ScreenMap calculateScreenSize(Rectangle screenSize,
                                            boolean hasOpacity)
                                     throws TransformException,
                                            NoninvertibleTransformException
Throws:
TransformException
NoninvertibleTransformException


Copyright © 1996-2009 Geotools. All Rights Reserved.