deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.commons.utils
Class GeometryUtils

java.lang.Object
  extended by org.deegree.commons.utils.GeometryUtils

public class GeometryUtils
extends Object

GeometryUtils

Version:
$Revision: 21223 $, $Date: 2009-12-03 16:17:44 +0100 (Do, 03 Dez 2009) $
Author:
Andreas Schmitz, last edited by: $Author: aschmitz $

Constructor Summary
GeometryUtils()
           
 
Method Summary
static Envelope createConvertedEnvelope(Envelope sourceEnvelope, CRS targetCRS)
          Converts the given Envelope into an envelope with the given coordinate system.
static LinkedList<Double> measurePathLengths(Shape shape)
          This method flattens the path with a flatness parameter of 1.
static Geometry move(Geometry geom, double offx, double offy)
          Moves the coordinates of a geometry.
static String prettyPrintShape(Shape shape)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryUtils

public GeometryUtils()
Method Detail

move

public static Geometry move(Geometry geom,
                            double offx,
                            double offy)
Moves the coordinates of a geometry.

Parameters:
geom - use only surfaces, line strings or points, and only with dim == 2
offx -
offy -
Returns:
the moved geometry

prettyPrintShape

public static String prettyPrintShape(Shape shape)
Parameters:
shape -
Returns:
a string representation of the shape

measurePathLengths

public static LinkedList<Double> measurePathLengths(Shape shape)
This method flattens the path with a flatness parameter of 1.

Parameters:
shape -
Returns:
the path segment lengths
See Also:
TextStroke

createConvertedEnvelope

public static Envelope createConvertedEnvelope(Envelope sourceEnvelope,
                                               CRS targetCRS)
                                        throws TransformationException
Converts the given Envelope into an envelope with the given coordinate system. Basically this is a delegate call to the GeometryTransformer.

Parameters:
sourceEnvelope - to convert
targetCRS -
Returns:
the target Envelope
Throws:
TransformationException
TransformationException - if the transformation between the source and target crs cannot be created.

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>