deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.model.csct.cs
Class Projection

java.lang.Object
  extended by org.deegree.model.csct.cs.Info
      extended by org.deegree.model.csct.cs.Projection
All Implemented Interfaces:
Serializable

public class Projection
extends Info

A projection from geographic coordinates to projected coordinates.

Version:
1.00, $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
Author:
OpenGIS (www.opengis.org), Martin Desruisseaux, last edited by: $Author: bezema $
See Also:
"org.opengis.cs.CS_Projection", Serialized Form

Field Summary
 
Fields inherited from class org.deegree.model.csct.cs.Info
pool
 
Constructor Summary
Projection(Map properties, String classification, javax.media.jai.ParameterList parameters)
          Creates a projection.
Projection(String name, String classification, Ellipsoid ellipsoid, Point2D centre, Point2D translation, double scaleFactor)
          Convenience constructor for a projection using the specified ellipsoid.
Projection(String name, String classification, javax.media.jai.ParameterList parameters)
          Creates a projection.
 
Method Summary
(package private)  String addString()
          Fill the part inside "[...]".
 boolean equals(Object object)
          Compares the specified object with this projection for equality.
 String getClassName()
          Gets the projection classification name (e.g.
(package private) static javax.media.jai.ParameterList getParameterList(String classification)
          Returns a parameter list for the specified classification.
 javax.media.jai.ParameterList getParameters()
          Returns all parameters.
 double getValue(String name)
          Convenience method for fetching a parameter value.
 double getValue(String name, double defaultValue)
          Convenience method for fetching a parameter value.
 int hashCode()
          Returns a hash value for this projection.
(package private) static javax.media.jai.ParameterList init(javax.media.jai.ParameterList parameters, Ellipsoid ellipsoid, Point2D centre, Point2D translation, double scaleFactor)
          Initialize a list of parameter from the specified ellipsoid and points.
 
Methods inherited from class org.deegree.model.csct.cs.Info
addUnit, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, getAbbreviation, getAlias, getAuthority, getAuthorityCode, getName, getRemarks, readResolve, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Projection

public Projection(String name,
                  String classification,
                  Ellipsoid ellipsoid,
                  Point2D centre,
                  Point2D translation,
                  double scaleFactor)
Convenience constructor for a projection using the specified ellipsoid.

Parameters:
name - Name to give new object.
classification - Classification string for projection (e.g. "Transverse_Mercator").
ellipsoid - Ellipsoid parameter. If non-null, then "semi_major" and "semi_minor" parameters will be set according.
centre - Central meridian and latitude of origin, in degrees. If non-null, then "central_meridian" and "latitude_of_origin" will be set according.
translation - False easting and northing, in metres. If non-null, then "false_easting" and "false_northing" will be set according.
scaleFactor -

Projection

public Projection(String name,
                  String classification,
                  javax.media.jai.ParameterList parameters)
Creates a projection. The set of parameters (parameters) may be queried with MathTransformFactory.getMathTransformProvider(classification).getParameterList().

Parameters:
name - Name to give new object.
classification - Classification string for projection (e.g. "Transverse_Mercator").
parameters - Parameters to use for projection, in metres or degrees.

Projection

Projection(Map properties,
           String classification,
           javax.media.jai.ParameterList parameters)
Creates a projection.

Parameters:
properties - The set of properties (see Info).
classification - Classification string for projection (e.g. "Transverse_Mercator").
parameters - Parameters to use for projection, in metres or degrees.
Method Detail

getParameterList

static javax.media.jai.ParameterList getParameterList(String classification)
Returns a parameter list for the specified classification. If there is no special parameter descriptor for the specified classification, then a default descriptor is used.

Parameters:
classification -
Returns:
a parameter list for the specified classification. If there is no special parameter descriptor for the specified classification, then a default descriptor is used.

init

static javax.media.jai.ParameterList init(javax.media.jai.ParameterList parameters,
                                          Ellipsoid ellipsoid,
                                          Point2D centre,
                                          Point2D translation,
                                          double scaleFactor)
Initialize a list of parameter from the specified ellipsoid and points.

Parameters:
parameters - The parameters to initialize.
ellipsoid - Ellipsoid parameter. If non-null, then "semi_major" and "semi_minor" parameters will be set according.
centre - Central meridian and latitude of origin, in degrees. If non-null, then "central_meridian" and "latitude_of_origin" will be set according.
translation - False easting and northing, in metres. If non-null, then "false_easting" and "false_northing" will be set according.
scaleFactor -
Returns:
parameters for convenience.

getClassName

public String getClassName()
Gets the projection classification name (e.g. "Transverse_Mercator").

Returns:
the projection classification name (e.g. "Transverse_Mercator").
See Also:
"org.opengis.cs.CS_Projection#getClassName()"

getParameters

public javax.media.jai.ParameterList getParameters()
Returns all parameters.

Returns:
all parameters.
See Also:
"org.opengis.cs.CS_Projection#getNumParameters()", "org.opengis.cs.CS_Projection#getParameter(int)"

getValue

public double getValue(String name)
                throws MissingParameterException
Convenience method for fetching a parameter value. Search is case-insensitive and ignore leading and trailing blanks.

Parameters:
name - Parameter to look for.
Returns:
The parameter value.
Throws:
MissingParameterException - if parameter name is not found.

getValue

public double getValue(String name,
                       double defaultValue)
Convenience method for fetching a parameter value. Search is case-insensitive and ignore leading and trailing blanks.

Parameters:
name - Parameter to look for.
defaultValue - Default value to return if parameter name is not found.
Returns:
The parameter value, or defaultValue if the parameter name is not found.

hashCode

public int hashCode()
Returns a hash value for this projection.

Overrides:
hashCode in class Info
Returns:
a hash value for this projection.

equals

public boolean equals(Object object)
Compares the specified object with this projection for equality.

Overrides:
equals in class Info
Parameters:
object -
Returns:

addString

String addString()
Fill the part inside "[...]". Used for formatting Well Know Text (WKT).

Overrides:
addString in class Info
Returns:
the String "PROJECTION"

deegree 2.1 (2007/11/08 09:57 build-328-official)

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