Projection Class Function Manual

ELLIPSOID

| HOME | BACK |

Purpose

To report  the current ellipsoid of the Projection object.

Class

Projection

Usage

{Ellipsoid} ret  =  object.ELLIPSOID()

Example:

->p1 = Projection()

->my_ellipsoid = p1.ellipsoid()

->

See also (class function)

 

| HOME | BACK |


GEO2XY

| HOME | BACK |

Purpose

To convert from geographic coordinate (latitude, longitude) to x y map projection coordinate.

Class

Projection

Usage

{Pt2D} ret  =  object.GEO2XY({double} argm1, {double} argm2)

argm1 = latitude (in degree)

argm2 = longitude (in degree)

Example:

->p1 = projection()

->p1.setMERCATOR(100,20)

->e = ellipsoid()

->e.set("GRS80")

->p1.ellipsoid() = e

->pt1 = p1.geo2xy(21,99)

->print pt1

     ( -104647.086 , 2234122.786)

->

See also (class function)

xy2geo

| HOME | BACK |


INIT

| HOME | BACK |

Purpose

To initialize a Projection object.

Class

Projection

Usage

{void} object.INIT({double} argm1)

argm1 = an ellipsoid object

Example:

->p1 = Projection()

->p1.init(my_ellipsoid)

->

See also (class function)

 

| HOME | BACK |


IS_SAME

| HOME | BACK |

Purpose

To check whether two Projection objects are the same.  The function checks the type of map projection, its parameters, as well as its ellipsoid definition.

Class

Projection

Usage

{bool} ret  =  object.IS_SAME({Projection} argm1)

argm1 = another Projection object

Example:

->b = p1.is_same(p2)

->

See also (class function)

 

| HOME | BACK |


LIST

| HOME | BACK |

Purpose

To list the names of all available map projections.  The results are stored in a vector of string, "VecStr" object.

Class

Projection

Usage

{VecStr} ret  =  object.LIST()

Example:

->p1 = projection()

->proj_list = p1.list()

->

See also (class function)

 

| HOME | BACK |


LOAD

| HOME | BACK |

Purpose

To load a Projection object saved as Noobeed format.  It is actually a sort of documentation file, and it is an ASCII file. 

If file name extensions are omitted, the function will add default extensions to the files.  The default extension of the projection file is ".txt".

Unless the path name is given in the file names, the function will search for the files in the current working directory, defined by command "set path".

The detail structure of the documentation file is described in function "save".

Class

Projection

Usage

{void} object.LOAD({String} argm1)

argm1 = file name for the documentation file (default extension is ".txt")

Example:

->p1 = projection()

->p1.load("my_proj")

->

See also (class function)

save

| HOME | BACK |


NAME

| HOME | BACK |

Purpose

To report  the current name of the Projection object.

Class

Projection

Usage

{String} ret  =  object.NAME()

Example:

->p1 = Projection()

->the_name = p1.name()

->

See also (class function)

 

| HOME | BACK |


PHE0

| HOME | BACK |

Purpose

To report  the current value of latitude of the origin of a map projection.  The value is applicable to all the existing map projection. 

Class

Projection

Usage

{String} ret  =  object.PHE0()

Example:

->p1 = Projection()

->phe = p1.phe0()

->

See also (class function)

ramda0

| HOME | BACK |


RAMDA0

| HOME | BACK |

Purpose

To report  the current value of the central meridian of a map projection.  The value is applicable to all the existing map projection. 

Class

Projection

Usage

{String} ret  =  object.RAMDA0()

Example:

->p1 = Projection()

->ramda = p1.ramda0()

->

See also (class function)

phe0

| HOME | BACK |


SAVE

| HOME | BACK |

Purpose

To save a Projection object as Noobeed format.  The function creates one documentation files.

The documentation file will have an extension ".txt".  It is actually an ASCII file and must have exactly 7lines as below.

 Projection

/ Documant file of a Projection object

/ projection name

UTM

/ projection parameters (phe0(deg) ramda0(deg) stdlat1(deg) stdlat2(deg) sk0 Xo Yo) - might not all relevant

0.000000000000000 291.000000000000000 0.000000000000000 0.000000000000000 0.999600000000000 500000.0000 0.0000

/ ellipsoid name

not_specified

/ ellipsoid (a, 1/f)

6378137.00000 298.2572235630

/ datum name

not_specified

/ datum shift from Earth center (Cx Cy Cz)

0.00000 0.00000 0.00000

if a file name extension is not given, the function assumes an extension of ".txt".

if a path name is not include in the specified file name, the function will save the data in the current data path, set by command "set path".

Class

Camera

Usage

{void} object.SAVE({String} argm1)

argm1 = documentation file name

Example:

->p1 = Projection()

->p1.setUTM(19)

->p1.save("my_projection")

->

See also (class function)

load

| HOME | BACK |


SF

| HOME | BACK |

Purpose

To compute the value of scale factor at a particular point, specified by latitude and longitude, of the current map projection object.  Please note some map projections have a different scale factor in x and y direction.

Class

Projection

Usage

{double} ret  =  object.SF({double} argm1, {double} argm2, [{int} argm3])

argm1 = latitude (in degree)

argm2 = longitude (in degree)

argm3 = flag for direction, 0 = x, y = 1

        (default = 0)

Example:

->p1 = Projection()

->p1.setUTM(19)

->p1.sf(10,291)

ans = 0.99960

->

See also (class function)

xy2geo, geo2xy

| HOME | BACK |


SK0

| HOME | BACK |

Purpose

To report  the current value of the scale factor at the origin / central meridian.  This might not be relevant to some map projections.

Class

Projection

Usage

{double} ret  =  object.SK0()

Example:

->p1 = Projection()

->p1.setUTM(19)

->p1.sk0()

ans = 0.99960

->

See also (class function)

phe0, ramda0, stadlat1, stdlat2

| HOME | BACK |


STDLAT1

| HOME | BACK |

Purpose

To report  the current value of the latitude of the 1st standard parallel.  This might not be relevant to some map projections.

Class

Projection

Usage

{double} ret  =  object.STDLAT1()

Example:

->lat1 = p1.stdlat1()

->

See also (class function)

phe0, ramda0, stdlat2

| HOME | BACK |


STDLAT2

| HOME | BACK |

Purpose

To report  the current value of the latitude of the 2nd standard parallel.  This might not be relevant to some map projections.

Class

Projection

Usage

{double} ret  =  object.STDLAT2()

Example:

->lat1 = p1.stdlat2()

->

See also (class function)

phe0, ramda0, stdlat1

| HOME | BACK |


TRANGEO2GEO

| HOME | BACK |

Purpose

To transform a geographic coordinate, latitude and longitude, of the current map projection system to a geographic coordinate in another map projection system.

Using this function will not make sense if the two projections have the same ellipsoid and the same datum.

Class

Projection

Usage

{Pt2D} ret  =  object.TRANGEO2GEO({double} argm1, {double} argm2, {Projection} argm3)

argm1 = latitude (in degree)

argm2 = longitude (in degree)

argm3 = The target map projection system

Example:

->p1 = Projection()

->e1 = ellipsoid()

->e1.setdatum("INDIAN54")

->p1.ellipsoid() = e1

->p2 = Projection()

->e2 = ellipsoid()

->e2.setdatum("INDIAN75")

->p2.ellipsoid() = e2

->pt1 = p1.trangeo2geo(10,99,p2)

->print dms(pt1.x(), 5)

10 00 00.27650

->print dms(pt1.y(), 5)

98 59 59.72672

->

See also (class function)

trangeo2xy, tranxy2geo, tranxy2xy

| HOME | BACK |


TRANGEO2XY

| HOME | BACK |

Purpose

To transform a geographic coordinate, latitude and longitude, of the current map projection system to an X Y coordinate in another map projection system.

Using this function will not make sense if the two projections have the same ellipsoid and the same datum.

Class

Projection

Usage

{Pt2D} ret  =  object.TRANGEO2XY({double} argm1, {double} argm2, {Projection} argm3)

argm1 = latitude (in degree)

argm2 = longitude (in degree)

argm3 = The target map projection system

Example:

->p1 = Projection()

->e1 = ellipsoid()

->e1.setdatum("INDIAN54")

->p1.ellipsoid() = e1

->p2 = Projection()

->e2 = ellipsoid()

->e2.setdatum("INDIAN75")

->p2.ellipsoid() = e2

->pt1 = p1.trangeo2xy(10,99,p2)

->print pt1

( 499991.682 , 1105333.779)

->

See also (class function)

trangeo2geo, tranxy2geo, tranxy2xy

| HOME | BACK |


TRANXY2GEO

| HOME | BACK |

Purpose

To transform an X Y map projection coordinate of the current map projection system to a geographic coordinate in another map projection system.

Using this function will not make sense if the two projections have the same ellipsoid and the same datum.

Class

Projection

Usage

{Pt2D} ret  =  object.TRANXY2GEO({double} argm1, {double} argm2, {Projection} argm3)

argm1 = x coordinate in the calling map projection system

argm2 = y coordinate in the calling map projection system

argm3 = The target map projection system

Example:

->p1 = Projection()

->e1 = ellipsoid()

->e1.setdatum("INDIAN54")

->p1.ellipsoid() = e1

->p2 = Projection()

->e2 = ellipsoid()

->e2.setdatum("INDIAN75")

->p2.ellipsoid() = e2

->pt1 = p2.tranxy2geo(499991.682, 1105333.779, p1)

->print dms(pt1.x(), 5)

   10 00 00.00000

->print dms(pt1.y(), 5)

   99 00 00.00001

->

See also (class function)

trangeo2xy, trangeo2xy, tranxy2xy

| HOME | BACK |


TRANXY2XY

| HOME | BACK |

Purpose

To transform an X Y map projection coordinate of the current map projection system to an X Y coordinate in another map projection system.

Using this function will not make sense if the two projections have the same ellipsoid and the same datum.

Class

Projection

Usage

{Pt2D} ret  =  object.TRANXY2XY({double} argm1, {double} argm2, {Projection} argm3)

argm1 = x coordinate in the calling map projection system

argm2 = y coordinate in the calling map projection system

argm3 = The target map projection system

Example:

->p1 = Projection()

->e1 = ellipsoid()

->e1.setdatum("INDIAN54")

->p1.ellipsoid() = e1

->p2 = Projection()

->e2 = ellipsoid()

->e2.setdatum("INDIAN75")

->p2.ellipsoid() = e2

->pt1 = p2.tranxy2xy(499991.682, 1105333.779, p1)

->print pt1

( 500000.000 , 1105325.288)

->

See also (class function)

trangeo2xy, trangeo2xy, tranxy2geo

| HOME | BACK |


VECGEO2XY

| HOME | BACK |

Purpose

To convert from a vector of geographic coordinates (latitude, longitude) to a vector of x y map projection coordinates.

Class

Projection

Usage

{VecPt2D} ret  =  object.VECGEO2XY({VecPt2D} argm1)

argm1 = vector of geographic coordinates, latitude and longitude

Example:

->p1 = projection()

->p1.setMERCATOR(100,20)

->v2 = p1.vecgeo2xy(v1)

->

See also (class function)

geo2xy

| HOME | BACK |


VECXY2GEO

| HOME | BACK |

Purpose

To convert from a vector of x y map projection coordinates to a vector of geographic coordinates (latitude, longitude) .

Class

Projection

Usage

{VecPt2D} ret  =  object.VECGEO2XY({VecPt2D} argm1)

argm1 = vector of x y coordinates

Example:

->p1 = projection()

->p1.setMERCATOR(100,20)

->v2 = p1.vecxy2geo(v1)

->

See also (class function)

xy2geo

| HOME | BACK |


VIDGEO2XY

| HOME | BACK |

Purpose

To convert from a vector of geographic coordinates (latitude, longitude)  with ID to a vector of x y map projection coordinates.

Class

Projection

Usage

{VecIdPt2D} ret  =  object.VIDGEO2XY({VecIdPt2D} argm1)

argm1 = vector of geographic coordinates, latitude and longitude, with ID

Example:

->p1 = projection()

->p1.setMERCATOR(100,20)

->v2 = p1.vidgeo2xy(v1)

->

See also (class function)

geo2xy

| HOME | BACK |


VIDXY2GEO

| HOME | BACK |

Purpose

To convert from a vector of x y map projection coordinates, with ID, to a vector of geographic coordinates (latitude, longitude) .

Class

Projection

Usage

{VecIdPt2D} ret  =  object.VIDGEO2XY({VecIdPt2D} argm1)

argm1 = vector of x y coordinates, with ID

Example:

->p1 = projection()

->p1.setMERCATOR(100,20)

->v2 = p1.vidxy2geo(v1)

->

See also (class function)

xy2geo

| HOME | BACK |


X0

| HOME | BACK |

Purpose

To report  the current value of the false origin in X coordinate.

Class

Projection

Usage

{double} ret  =  object.X0()

Example:

->p1 = Projection()

->p1.setUTM(19)

->p1.X0()

  ans = 500000.0000

->

See also (class function)

phe0, ramda0, stadlat1, stdlat2

| HOME | BACK |


XY2GEO

| HOME | BACK |

Purpose

To convert from a vector of x y map projection coordinates, with ID, to a vector of geographic coordinates (latitude, longitude) .

Class

Projection

Usage

{VecIdPt2D} ret  =  object.VIDGEO2XY({double} argm1,{double} argm2)

argm1 = x coordinates

argm2 = y coordinate

Example:

->p1 = projection()

->p1.setTOPOCTRC(-80,100)

->e = ellipsoid()

->e.set("CLARKE66")

->p1.ellipsoid() = e

->pt1 = p1.geo2xy(deg(-80.15202345), deg(99.20124567))

->print pt1

    ( -12536.702 , -28615.454)

->pt2 = p1.xy2geo(pt1.x(), pt1.y())

->print dms(pt2.x(), 5)

   -80 15 20.22356

->print dms(pt2.y(), 5)

    99 20 12.48590

->

See also (class function)

geo2xy

| HOME | BACK |


Y0

| HOME | BACK |

Purpose

To report  the current value of the false origin in Y coordinate.

Class

Projection

Usage

{double} ret  =  object.Y0()

Example:

->p1 = Projection()

->p1.setUTM(19)

->p1.Y0()

  ans = 0.0000

->

See also (class function)

phe0, ramda0, stadlat1, stdlat2

| HOME | BACK |