net.surveyos.sourceforge.jtswarped.utilities
Class JtsCoordinateUtilities

java.lang.Object
  extended by net.surveyos.sourceforge.jtswarped.utilities.JtsCoordinateUtilities

public class JtsCoordinateUtilities
extends java.lang.Object

Provides a set of utility methods for analysis and manipulation of JTS Coordinate objects that can be accessed from a static context.


Constructor Summary
JtsCoordinateUtilities()
           
 
Method Summary
 boolean areCoordinatesAtSameElevation(double argTolerance, com.vividsolutions.jts.geom.Coordinate argFirstCoordinate, com.vividsolutions.jts.geom.Coordinate argSecondCoordinate)
          Determines if the two (2) coordinates passed to this method as arguments have the same elevation.
 boolean areCoordinatesEqual(double argTolerance, com.vividsolutions.jts.geom.Coordinate argFirstCoordinate, com.vividsolutions.jts.geom.Coordinate argSecondCoordinate)
          Test coordinates for equality.
 double[] getChangeInXAndchangeInY(com.vividsolutions.jts.geom.Coordinate argFirstCoordinate, com.vividsolutions.jts.geom.Coordinate argSecondCoordinate)
          Returns an array with two (2) doubles.
 java.util.List<com.vividsolutions.jts.geom.Coordinate> getHighestCoordinates(com.vividsolutions.jts.geom.Coordinate[] argCoordinates)
          Returns the highest Coordinate of the Coordinate objects contained in the array.
 java.util.List<com.vividsolutions.jts.geom.Coordinate> getLowestCoordinates(com.vividsolutions.jts.geom.Coordinate[] argCoordinates)
          Returns the lowest Coordinate of the Coordinate object contained in the array.
 java.util.List<com.vividsolutions.jts.geom.Coordinate> getMostEasterlyCoordinates(com.vividsolutions.jts.geom.Coordinate[] argCoordinates)
          Returns the most easterly Coordinate of the Coordinate objects contained in the array.
 java.util.List<com.vividsolutions.jts.geom.Coordinate> getMostNortherlyCoordinates(com.vividsolutions.jts.geom.Coordinate[] argCoordinates)
          Returns the most northerly Coordinate of the Coordinate objects contained in the array.
 java.util.List<com.vividsolutions.jts.geom.Coordinate> getMostSoutherlyCoordinates(com.vividsolutions.jts.geom.Coordinate[] argCoordinates)
          Returns the most easterly Coordinate of the Coordinate objects contained in the array.
 java.util.List<com.vividsolutions.jts.geom.Coordinate> getMostWesterlyCoordinates(com.vividsolutions.jts.geom.Coordinate[] argCoordinates)
          Returns the most westerly Coordinate of the Coordinate objects contained in the array.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JtsCoordinateUtilities

public JtsCoordinateUtilities()
Method Detail

getMostEasterlyCoordinates

public java.util.List<com.vividsolutions.jts.geom.Coordinate> getMostEasterlyCoordinates(com.vividsolutions.jts.geom.Coordinate[] argCoordinates)
Returns the most easterly Coordinate of the Coordinate objects contained in the array. If more than one Coordinate share the most easterly ordinate, they are all returned.


getMostNortherlyCoordinates

public java.util.List<com.vividsolutions.jts.geom.Coordinate> getMostNortherlyCoordinates(com.vividsolutions.jts.geom.Coordinate[] argCoordinates)
Returns the most northerly Coordinate of the Coordinate objects contained in the array. If more than one Coordinate share the most northerly ordinate, they are all returned.


getMostWesterlyCoordinates

public java.util.List<com.vividsolutions.jts.geom.Coordinate> getMostWesterlyCoordinates(com.vividsolutions.jts.geom.Coordinate[] argCoordinates)
Returns the most westerly Coordinate of the Coordinate objects contained in the array. If more than one Coordinate share the most easterly ordinate, they are all returned.


getMostSoutherlyCoordinates

public java.util.List<com.vividsolutions.jts.geom.Coordinate> getMostSoutherlyCoordinates(com.vividsolutions.jts.geom.Coordinate[] argCoordinates)
Returns the most easterly Coordinate of the Coordinate objects contained in the array. If more than one Coordinate share the most southerly ordinate, they are all returned.


getHighestCoordinates

public java.util.List<com.vividsolutions.jts.geom.Coordinate> getHighestCoordinates(com.vividsolutions.jts.geom.Coordinate[] argCoordinates)
Returns the highest Coordinate of the Coordinate objects contained in the array. If more than one Coordinate share the most highest ordinate, they are all returned.


getLowestCoordinates

public java.util.List<com.vividsolutions.jts.geom.Coordinate> getLowestCoordinates(com.vividsolutions.jts.geom.Coordinate[] argCoordinates)
Returns the lowest Coordinate of the Coordinate object contained in the array. If more than one Coordinate share the lowest ordinate, they are all returned.


getChangeInXAndchangeInY

public double[] getChangeInXAndchangeInY(com.vividsolutions.jts.geom.Coordinate argFirstCoordinate,
                                         com.vividsolutions.jts.geom.Coordinate argSecondCoordinate)
Returns an array with two (2) doubles. The first double contains the change-in-x or change-in-easting between the two Coordinate objects. The second double contains the change-in-y or change-in-northing between the two Coordinate objects. The x and y ordinates of the second Coordinate passed as an argument are always subtracted from the ordinates of the first Coordinate passed as an argument. If the ordinate values of the second Coordinate passed as an argument are greater than the ordinate values of the first Coordinate passed as an argument, negative values will be returned.


areCoordinatesEqual

public boolean areCoordinatesEqual(double argTolerance,
                                   com.vividsolutions.jts.geom.Coordinate argFirstCoordinate,
                                   com.vividsolutions.jts.geom.Coordinate argSecondCoordinate)
Test coordinates for equality. The two (2) coordinates passed to this method as arguments are considered equal if the horizontal distance between them is less than the tolerance passed as a double argument to the method. If the coordinates are equal according to this test, a boolean value of true is returned.


areCoordinatesAtSameElevation

public boolean areCoordinatesAtSameElevation(double argTolerance,
                                             com.vividsolutions.jts.geom.Coordinate argFirstCoordinate,
                                             com.vividsolutions.jts.geom.Coordinate argSecondCoordinate)
Determines if the two (2) coordinates passed to this method as arguments have the same elevation. This is considered to be true if the vertical difference between them is less than the tolerance passed as a double argument to the method. If the coordinates are equal according to this test, a boolean value of true is returned.