com.oziexplorer
Class UserGridRef

java.lang.Object
  extended by com.oziexplorer.Position
      extended by com.oziexplorer.GridRef
          extended by com.oziexplorer.UserGridRef

public class UserGridRef
extends GridRef

This class provides for grid references in user-specified coordinate systems. Each reference is associated with a UserGridRef object that defines the coordinate system for the reference.

Copyright 2011 Alan Burlison, . All rights reserved. Use is subject to license terms, see LICENSE.txt.
SourceForge.net


Field Summary
protected static UserGridDef defaultUserGridDef
          Default user grid definition - invalid!
protected  UserGridDef userGridDef
          The user grid used by this reference.
 
Fields inherited from class com.oziexplorer.GridRef
defaultGrid, easting, grid, northing, zone
 
Fields inherited from class com.oziexplorer.Position
comparisonAccuracy, datum
 
Constructor Summary
UserGridRef(String datum, String zone, double easting, double northing)
          Create a new user grid reference in for the default user grid with the given zone, easting and northing.
UserGridRef(UserGridDef userGridDef, String datum, String zone, double easting, double northing)
          Create a new user grid reference for the given UserGridDef, grid, zone, easting and northing.
 
Method Summary
 boolean equals(Object that)
          Test for object equality.
 int hashCode()
          Return the hash code for this object.
 
Methods inherited from class com.oziexplorer.GridRef
addVector, getDefaultGrid, getEasting, getGrid, getNorthing, getZone, setDefaultGrid, toString, vectorBetween
 
Methods inherited from class com.oziexplorer.Position
getComparisonAccuracy, getDatum, setComparisonAccuracy
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

userGridDef

protected final UserGridDef userGridDef
The user grid used by this reference.


defaultUserGridDef

protected static UserGridDef defaultUserGridDef
Default user grid definition - invalid!

Constructor Detail

UserGridRef

public UserGridRef(UserGridDef userGridDef,
                   String datum,
                   String zone,
                   double easting,
                   double northing)
Create a new user grid reference for the given UserGridDef, grid, zone, easting and northing.

Parameters:
userGridDef - user grid definition.
datum - datum name.
zone - grid zone.
easting - the easting.
northing - the northing.

UserGridRef

public UserGridRef(String datum,
                   String zone,
                   double easting,
                   double northing)
Create a new user grid reference in for the default user grid with the given zone, easting and northing.

Parameters:
datum - datum name.
zone - grid zone.
easting - the easting.
northing - the northing.
Method Detail

equals

public boolean equals(Object that)
Test for object equality.

Overrides:
equals in class GridRef
Parameters:
that - the object to compare against.
Returns:
true if the grid definitions are equal.

hashCode

public int hashCode()
Return the hash code for this object.

Overrides:
hashCode in class GridRef
Returns:
the hash code for this object