PeObjects
 

PeObject

 

PeCoordinateSystem

 

PeProjectedCS

 

PeGeographicCS

 

PeHorizon

 

PeParameters

 

PeUnit

 

PeDatum

 

PePrimeMeridian

 

PeSpheroid

 

PeProjection

 

PeMethod

  PeGeogTransformations
 

 

Coordinate Transformations
  PeCSTransformations
 

 

PE Factory
  PeFactory
 

 

Predefined PE Objects
  PeDefs
  PeDatumsDefs
  PeGCSDefs
  PeGTDefs
  PeMethsDefs
  PeParamsDefs
 

PePCSDefs

  PePrimemDefs
  PeProjsDefs
  PeSpheroidsDefs
  PeUnitsDefs
   
PE Math Functions
  PeMath
 

 

 

 

Projection Engine Java API
PeGeographicCS

A geographic coordinate system describes a three-dimensional reference system that locates points on the Earth's surface. A geographic coordinate system object has the following components: PeUnit, PeDatum and PePrimeMeridian.

A Geographic Coordinate System has the following components:

Angular units - The unit of measure on the spherical reference system.

Spheroid - The reference spheroid for the coordinate system.

Datum - Defines the relationship of the reference spheroid to the Earth's surface.

Prime Meridian - The longitude origin of the spherical reference system.

 

method
parameters
returned value
PeGeographicCS String gcsString PeGeographicCS
PeGeographicCS String name, PeDatum datum, PePrimeMeridian primem, PeUnit unit PeGeographicCS
clone   Object
delete

 

 
fromString String gcsString PeGeographicCS
getDatum   PeDatum
getName   String
getPrimeM   PePrimeMeridian
getUnit   PeUnit
isEqual PeCoordinateSystem coordsys boolean
isEqual PeObject peobj boolean
isEqual PeGeographicCS geogcs boolean
toString   String

 

PeGeographicCS(String name, PeDatum datum, PePrimeMeridian primem, PeUnit unit)

Creates a geographic coordinate system object.

Parameters

name the name of the geographic coordinate system
datum the datum object
primem the prime meridian object
unit the unit object

Returns

PeGeographicCS gcs - The geographic coordinate system object.

Throws

PeProjectionException

Example

      try {

        PeGeographicCS gcs = new PeGeographicCS("GCS_WGS_1984",
                datum, primem, unit);
      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>

PeGeographicCS(String gcsString)

Creates a geographic coordinate system object from its string representation.

Parameters

gcsString the geographic coordinate system description

Returns

PeGeographicCS gcs - The geographic coordinate system object.

Throws

PeProjectionException

Example

      try {
        String str = new String(
             "GEOGCS[\"GCS_WGS_1984\",DATUM" + 
             "[\"D_WGS_1984_\"," + 
             "SPHEROID[\"WGS_1984\",6378137, 298.257223563]]," +
             "PRIMEM[\"Greenwich\",0]," +
             "UNIT[\"Degree\",0.0174532925199433]]");
        PeGeographicCS gcs = new PeGeographicCS(str);
      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>

clone()

Creates a new geographic coordinate system object from this object.

Parameters

none

Returns

Object - the cloned object.

Throws

PeProjectionException

Example

      try {
        PeGeographicCS gcs1 = new PeGeographicCS(str);
        PeGeographicCS gcs2 = (PeGeographicCS)gcs1.clone(); 

      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>

delete()

Removes a geographic coordinate system object.

Parameters

none

Returns

void

Throws

PeProjectionException

Example

      try {
        PeGeographicCS gcs1 = new PeGeographicCS(str);
        gcs1.delete();

      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>

fromString(String gcsString)

Creates a geographic coordinate system object from its string representation.

Parameters

gcsString the geographic coordinate system description

Returns

PeGeographicCS gcs - The geographic coordinate system object.

Throws

PeProjectionException

Example

      try {
        String str = new String(
             "GEOGCS[\"GCS_WGS_1984\",DATUM" + 
             "[\"D_WGS_1984_\"," + 
             "SPHEROID[\"WGS_1984\",6378137, 298.257223563]]," +
             "PRIMEM[\"Greenwich\",0]," +
             "UNIT[\"Degree\",0.0174532925199433]]");
        PeGeographicCS gcs = PeGeographicCS.fromString();
      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>

getDatum()

Retrieves the datum of a geographic coordinate system.

Parameters

none

Returns

PeDatum datum - The datum object.

Throws

PeProjectionException

Example

      try {
        PeGeographicCS gcs1 = new PeGeographicCS(str);
        PeDatum datum = gcs1.getDatum();

      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>

getName()

Retrieves the name of a geographic coordinate system.

Parameters

none

Returns

String name - The name of thsi geographic coordinate system.

Throws

PeProjectionException

Example

      try {
        PeGeographicCS gcs1 = new PeGeographicCS(str);
        String name = gcs1.getName();

      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>

getPrimeM()

Retrieves the prime meridian of this geographic coordinate system object.

Parameters

none

Returns

PePrimeMeridian primem - The prime meridian object.

Throws

PeProjectionException

Example

      try {
        PeGeographicCS gcs1 = new PeGeographicCS(str);
        PePrimeMeridian primem = gcs1.getPrimeM();

      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>

getUnit

Retrieves the unit of measure of this geographic coordinate system object.

Parameters

none

Returns

PeUnit unit - The unit of measure object.

Throws

PeProjectionException

Example

      try {
        PeGeographicCS gcs1 = new PeGeographicCS(str);
        PeUnit unit = gcs1.getUnit();

      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>

isEqual(PeCoordinateSystem cs)

Tests whether a coodinate system object is equivalent to this geographic coordinate system object.

Parameters

cs the coordinate system object

Returns

boolean bval - True if both objects are equal, false otherwise.

Throws

PeProjectionException

Example

      try {
        PeGeographicCS gcs = new PeGeographicCS(str1);
        PeCoordinateSystem coordsys = new PeCooordinateSystem(str2);
        boolean bval = gcs.isEqual(coordsys);

      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>

isEqual(PeObject peobj)

Tests whether two geographic coordinate system objects are equivalent.

Parameters

peobj the preojection engine object

Returns

boolean bval - True if both objects are equal, false otherwise.

Throws

PeProjectionException

Example

      try {
        PeGeographicCS gcs1 = new PeGeographicCS(str);
        PeObject peobj = (PeObject)gcs1.clone();
        boolean bval = gcs1.isEqual(peobj);

      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>

isEqual(PeGeographicCS gcs)

Tests whether two geographic coordinate system objects are equivalent.

Parameters

gcs the geograhic coordinate system object

Returns

boolean bval - True if both objects are equal, false otherwise.

Throws

PeProjectionException

Example

      try {
        PeGeographicCS gcs1 = new PeGeographicCS(str);
        PeGeographicCS gcs2 = (PeGeographicCS)gcs1.clone();
        boolean bval = gcs1.isEqual(gcs2);

      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>

toString()

Creates a string representation of this coordinate system object.

Parameters

none

Returns

String gcsString - The string representation of this coordinate system object.

Throws

PeProjectionException

Example

      try {
        PeGeographicCS gcs1 = new PeGeographicCS(str);
        String str2 = gcs1.toString();

      } catch (PeProjectionException e) {
        e.printStackTrace();
      }

      

<top>