com.oziexplorer
Class UserGridDef

java.lang.Object
  extended by com.oziexplorer.UserGridDef

public class UserGridDef
extends Object

This class contains the information needed to define a user-specified grid.

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


Field Summary
protected  double k0
          K (scale) factor.
protected  double lat0
          Lattitude of origin.
protected  double lat1
          Lattitude 1 for Lambert Conformal Conic.
protected  double lat2
          Lattitude 2 for Lambert Conformal Conic.
protected  double lon0
          Longitude of origin.
protected  String name
          Name of the grid.
protected  double x0
          False easting.
protected  double y0
          False northing.
 
Constructor Summary
UserGridDef(String name, double lat0, double lon0, double k0, double x0, double y0)
          Creates a new UserGridDef for projections other than Lambert Conformal Conic.
UserGridDef(String name, double lat0, double lon0, double lat1, double lat2, double k0, double x0, double y0)
          Create a new UserGridDef.
 
Method Summary
 boolean equals(Object that)
          Test for object equality.
 double getK0()
          Retrieve the K (scale) factor for the grid.
 double getLat0()
          Retrieve the lattitude of the grid origin.
 double getLat1()
          Retrieve lattitude 1 for Lambert Conformal Conic grids.
 double getLat2()
          Retrieve lattitude 2 for Lambert Conformal Conic grids.
 double getLon0()
          Retrieve the longitude of the grid origin.
 String getName()
          Retrieve the name of the grid.
 double getX0()
          Retrieve the false easting for the grid.
 double getY0()
          Retrieve the false northing for the grid.
 int hashCode()
          Return the hash code for this object.
 String toString()
          Retrieve a string representation of the grid.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected final String name
Name of the grid.


lat0

protected final double lat0
Lattitude of origin.


lon0

protected final double lon0
Longitude of origin.


lat1

protected final double lat1
Lattitude 1 for Lambert Conformal Conic.


lat2

protected final double lat2
Lattitude 2 for Lambert Conformal Conic.


k0

protected final double k0
K (scale) factor.


x0

protected final double x0
False easting.


y0

protected final double y0
False northing.

Constructor Detail

UserGridDef

public UserGridDef(String name,
                   double lat0,
                   double lon0,
                   double lat1,
                   double lat2,
                   double k0,
                   double x0,
                   double y0)
            throws OziException
Create a new UserGridDef.

Parameters:
name - name of the user grid
lat0 - lattitude of origin
lon0 - longitude of origin
lat1 - lattitude 1 for Lambert Conformal Conic
lat2 - lattitude 2 for Lambert Conformal Conic
k0 - K (scale) factor
x0 - false easting
y0 - false northing
Throws:
OziException - if OziAPI returns an error

UserGridDef

public UserGridDef(String name,
                   double lat0,
                   double lon0,
                   double k0,
                   double x0,
                   double y0)
            throws OziException
Creates a new UserGridDef for projections other than Lambert Conformal Conic.

Parameters:
name - name of the user grid
lat0 - lattitude of origin
lon0 - longitude of origin
k0 - K (scale) factor
x0 - false easting
y0 - false northing
Throws:
OziException - if OziAPI returns an error
Method Detail

equals

public boolean equals(Object that)
Test for object equality. Note the grid name is not significant - the grids are the same if the parameters are all equal.

Overrides:
equals in class Object
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. Note the name does not play a part in the calculation of the hash code.

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

getName

public String getName()
Retrieve the name of the grid.

Returns:
the name of the grid

getLat0

public double getLat0()
Retrieve the lattitude of the grid origin.

Returns:
the lattitude of the grid origin

getLon0

public double getLon0()
Retrieve the longitude of the grid origin.

Returns:
the longitude of the grid origin

getLat1

public double getLat1()
Retrieve lattitude 1 for Lambert Conformal Conic grids.

Returns:
lattitude 1 for Lambert Conformal Conic grids

getLat2

public double getLat2()
Retrieve lattitude 2 for Lambert Conformal Conic grids.

Returns:
lattitude 2 for Lambert Conformal Conic grids

getK0

public double getK0()
Retrieve the K (scale) factor for the grid.

Returns:
the K (scale) factor for the grid

getX0

public double getX0()
Retrieve the false easting for the grid.

Returns:
the false easting for the grid

getY0

public double getY0()
Retrieve the false northing for the grid.

Returns:
the false northing for the grid

toString

public String toString()
Retrieve a string representation of the grid.

Overrides:
toString in class Object
Returns:
a string representation of the grid