gistoolkit.datasources
Class ShapeUtils

java.lang.Object
  extended bygistoolkit.datasources.ShapeUtils

public class ShapeUtils
extends java.lang.Object

Class for checking and manipulating the objects. Probably only usefull intermediatly, most of these routines should be handled by the features themselves.


Constructor Summary
ShapeUtils()
          ShapeUtils constructor comment.
 
Method Summary
static double checkOrientation(double[] chkarrayx, double[] chkarrayy, int numpts)
          Checkorient tests the clockwise or counter-clockwise orientation of a polygon.
static double checkOrientation(Point[] inPoints)
          checkorient tests the clockwise or counter-clockwise orientation of a polygon.
static boolean isInside(Point[] inOuterPoints, Point[] inInnerPoints)
          determines if the second shape is within the first shape.
static void projectBackward(GISDataset inDataset, Projection inProjection)
          Projects the entire dataset backward using the given projection.
static void projectForward(GISDataset inDataset, Projection inProjection)
          Projects the entire dataset foreward using the given projection.
static void reproject(GISDataset inDataset, Projection inOldProjection, Projection inNewProjection)
          Reproject the entire dataset, backward from the old projection, forward to the new projection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeUtils

public ShapeUtils()
ShapeUtils constructor comment.

Method Detail

checkOrientation

public static double checkOrientation(double[] chkarrayx,
                                      double[] chkarrayy,
                                      int numpts)
Checkorient tests the clockwise or counter-clockwise orientation of a polygon.

returned values:
>0 clockwise

=0 if points are in a straight line

<0 counter-clockwise


checkOrientation

public static double checkOrientation(Point[] inPoints)
checkorient tests the clockwise or counter-clockwise orientation of a polygon.

returned values:
>0 clockwise

=0 if points are in a straight line

<0 counter-clockwise


isInside

public static boolean isInside(Point[] inOuterPoints,
                               Point[] inInnerPoints)
determines if the second shape is within the first shape.


projectForward

public static void projectForward(GISDataset inDataset,
                                  Projection inProjection)
                           throws java.lang.Exception
Projects the entire dataset foreward using the given projection.

Throws:
java.lang.Exception

projectBackward

public static void projectBackward(GISDataset inDataset,
                                   Projection inProjection)
                            throws java.lang.Exception
Projects the entire dataset backward using the given projection.

Throws:
java.lang.Exception

reproject

public static void reproject(GISDataset inDataset,
                             Projection inOldProjection,
                             Projection inNewProjection)
                      throws java.lang.Exception
Reproject the entire dataset, backward from the old projection, forward to the new projection

Throws:
java.lang.Exception