deegree 2.2 (2008/12/22 11:33 build-3038-official)

org.deegree.framework.xml
Class GeometryUtils

java.lang.Object
  extended by org.deegree.framework.xml.GeometryUtils

public class GeometryUtils
extends Object

Utility methods for handling geometries within XSLT transformations

Since:
2.0
Version:
$Revision: 9339 $, 1.0. $Revision: 9339 $, $Date: 2007-12-27 13:31:52 +0100 (Do, 27 Dez 2007) $
Author:
Andreas Poth, last edited by: $Author: apoth $

Constructor Summary
GeometryUtils()
           
 
Method Summary
static double calcArea(Node node)
           
static double calcOuterBoundaryLength(Node node)
           
static double getCentroidX(Node node, String targetCRS)
          returns the centroid X coordinate of the geometry represented by the passed Node
static double getCentroidY(Node node, String targetCRS)
          returns the centroid Y coordinate of the geometry represented by the passed Node
static String getCurveCoordinates(Node node)
           
static String getEnvelopeFromGeometry(Node node)
           
static String getPolygonCoordinatesFromEnvelope(Node node)
           
static String getPolygonInnerRing(Node node, int index, String sourceCRS, String targetCRS)
           
static String getPolygonOuterRing(Node node, String sourceCRS, String targetCRS)
          returns the coordinates of the out ring of a polygon as comma seperated list.
 
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

getPolygonCoordinatesFromEnvelope

public static String getPolygonCoordinatesFromEnvelope(Node node)
Parameters:
node -
Returns:

getEnvelopeFromGeometry

public static String getEnvelopeFromGeometry(Node node)
Parameters:
node -
Returns:

getPolygonOuterRing

public static String getPolygonOuterRing(Node node,
                                         String sourceCRS,
                                         String targetCRS)
returns the coordinates of the out ring of a polygon as comma seperated list. The coordinate tuples are seperated by a blank. If required the polygon will first transformed to the target CRS

Parameters:
node -
sourceCRS -
targetCRS -
Returns:

getPolygonInnerRing

public static String getPolygonInnerRing(Node node,
                                         int index,
                                         String sourceCRS,
                                         String targetCRS)
Parameters:
node -
index -
sourceCRS -
targetCRS -
Returns:

calcArea

public static double calcArea(Node node)
Parameters:
node -
Returns:

calcOuterBoundaryLength

public static double calcOuterBoundaryLength(Node node)
Parameters:
node -
Returns:

getCentroidX

public static double getCentroidX(Node node,
                                  String targetCRS)
returns the centroid X coordinate of the geometry represented by the passed Node

Parameters:
node -
targetCRS -
Returns:

getCentroidY

public static double getCentroidY(Node node,
                                  String targetCRS)
returns the centroid Y coordinate of the geometry represented by the passed Node

Parameters:
node -
targetCRS -
Returns:

getCurveCoordinates

public static String getCurveCoordinates(Node node)

deegree 2.2 (2008/12/22 11:33 build-3038-official)

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