deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.crs
Class CRS

java.lang.Object
  extended by org.deegree.crs.CRS

public class CRS
extends Object

Represents the name to a CRS that is not necessarily resolved or resolvable.

Their are two aspects that this class takes care of:

  • In most use cases, coordinate reference system are identified using strings (such as 'EPSG:4326'). However, there are multiple equivalent ways to encode coordinate reference system identifications (another one would be 'urn:ogc:def:crs:EPSG::4326'). By using this class to represent a CRS, the original spelling is maintained.
  • A coordinate reference system may be specified which is not known to the CRSRegistry. However, for some operations this is not a necessarily a problem, e.g. a GML document may be read and transformed into Feature and Geometry objects.
  • Version:
    $Revision: $, $Date: $
    Author:
    Andrei Ionita, last edited by: $Author: ionita $

    Field Summary
    static CRS EPSG_4326
              The commonly used geographic 'EPSG:4326', with axis order X, Y.
     
    Constructor Summary
    CRS(CoordinateSystem crs)
               
    CRS(File prj)
              Try to read a crs from the given (prj) file which is supposed to define a WKT definition.
    CRS(String crsName)
              Creates a new CRS instance with a coordinate reference system name.
     
    Method Summary
     boolean equals(Object other)
               
     Envelope getAreaOfUse()
              Returns the area of use, i.e. the domain where this CRSIdentifiable is valid.
     String getName()
              Returns the string that identifies the CRS.
     CoordinateSystem getWrappedCRS()
              Returns the corresponding CRS object.
     String toString()
               
     
    Methods inherited from class java.lang.Object
    clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    EPSG_4326

    public static final CRS EPSG_4326
    The commonly used geographic 'EPSG:4326', with axis order X, Y.

    Constructor Detail

    CRS

    public CRS(String crsName)
    Creates a new CRS instance with a coordinate reference system name.

    Parameters:
    crsName - name of the crs (identification string) or null

    CRS

    public CRS(CoordinateSystem crs)
    Parameters:
    crs -

    CRS

    public CRS(File prj)
        throws IOException
    Try to read a crs from the given (prj) file which is supposed to define a WKT definition.

    Parameters:
    prj - a file containing a wkt representation of the coordinate system.
    Throws:
    IOException
    Method Detail

    getName

    public String getName()
    Returns the string that identifies the CRS.

    Returns:
    the string that identifies the coordinate reference system

    getWrappedCRS

    public CoordinateSystem getWrappedCRS()
                                   throws UnknownCRSException
    Returns the corresponding CRS object.

    Returns:
    the coordinate reference system, or null if the name is null
    Throws:
    UnknownCRSException

    equals

    public boolean equals(Object other)
    Overrides:
    equals in class Object

    getAreaOfUse

    public Envelope getAreaOfUse()
                          throws UnknownCRSException
    Returns the area of use, i.e. the domain where this CRSIdentifiable is valid.

    Returns:
    the domain of validity (EPSG:4326 coordinates), order: minX, minY, maxX, maxY, never null (-180,-90,180,90) if no such information is available
    Throws:
    UnknownCRSException

    toString

    public String toString()
    Overrides:
    toString in class Object

    deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

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

    ]]>