Projection Class Function Manual (SET)

SETALBERS

| HOME | BACK |

Purpose

To set a projection object to the Albers Equal-Area Conic Projection.

All angles are required and expressed in degrees.

Description and computation algorithms adopted from Snyder, J. P. (1987), Map Projections - A Working Manual.

The following is a summary of the projection.

Class

Projection

Usage

{void} object.SETALBERS({double} argm1,{double} argm2,{double} argm3,{double} argm4,[{double} argm5,{double} argm6])

argm1 = latitude of origin

argm2 = longitude of central meridian (the Y-axis)

argm3 = latitude of the 1st standard parallel

argm4 = latitude of the 2nd standard parallel

argm5 = false origin X value (default = 0)

argm6 = false origin Y value (default = 0)

Example:

->p = projection()

->p.setalbers(deg(31.4),deg(-98.3), deg(32.08), deg(33.58))

->e.set("clarke66")

->p.ellipsoid() = e

->p.geo2xy(deg(32.15202345), deg(-99.40004567))

 ans = ( -109943.651 , 65911.506)

->

The above example set the Albers Equal-Area Conic projection's origin at  latitude 31 deg 40 min.  The central meridian is at longitude -98 deg 8 min.  The two standard parallels are at latitudes 32 deg 8 min, and 33 deg 58 min. False origin is x = 0 and y = 0.  The test data is at latitude 32 deg 15 min 20.2345 sec and longitude -99 deg 40 min 00.4567 sec.

See also (class function)

geo2xy, xy2geo

| HOME | BACK |


SETGNOMONIC

| HOME | BACK |

Purpose

To set a projection object to the Gnomonic Projection. 

This projection is used only in the spherical form, hence the radius of the sphere will be taken from the value of the semi-major axis of the defined ellipsoid.

All angles are required and expressed in degrees.

Description and computation algorithms adopted from Snyder, J. P. (1987), Map Projections - A Working Manual.

The following is a summary of the projection.

Class

Projection

Usage

{void} object.SETGNOMONIC({double} argm1,{double} argm2,[{double} argm3,{double} argm4])

argm1 = latitude of origin

argm2 = longitude of central meridian (the Y-axis)

argm3 = false origin X value (default = 0)

argm4 = false origin Y value (default = 0)

Example:

->p1 = projection()

->p1.setGnomonic(-80,100)

WARNING : Gnomonic projection is available only in the spherical form

WARNING : The calling ellipsoid should have zero flattening, a sphere of radius a (semi-major axis) is assumed...

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

ans = ( -12495.434 , -28527.031)

->pt = ans
->p1.xy2geo(pt.x(), pt.y())

  ans = ( -80.256 , 99.337)

->pt1 = ans

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

  ans = -80 15 20.23450

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

  ans = 99 20 12.45670

->

The above example set the Gnomonic projection's origin at  latitude 80 deg 0 min.  The central meridian is at longitude 100 deg 0 min.  False origin is x = 0 and y = 0.  The test data is at latitude -80 deg 15 min 20.2345 sec and longitude 99 deg 20 min 12.4567 sec.

See also (class function)

geo2xy, xy2geo

| HOME | BACK |


SETLAEA

| HOME | BACK |

Purpose

To set a projection object to the Lambert Azimuthal Equal-Area Projection.

All angles are required and expressed in degrees.

Description and computation algorithms adopted from Snyder, J. P. (1987), Map Projections - A Working Manual.

The following is a summary of the projection.

Class

Projection

Usage

{void} object.SETLAEA({double} argm1,{double} argm2,[{double} argm3,{double} argm4])

argm1 = latitude of origin

argm2 = longitude of central meridian (the Y-axis)

argm3 = false origin X value (default = 0)

argm4 = false origin Y value (default = 0)

Example:

->p1 = projection()

->p1.setLAEA(-80,100)

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

  ans = ( -12536.170 , -28614.214)

->pt = ans

->p1.xy2geo(pt.x(), pt.y())

  ans = ( -80.256 , 99.337)

->pt1 = ans

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

  ans = -80 15 20.23450

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

  ans = 99 20 12.45670

->

The above example set the Gnomonic projection's origin at  latitude 80 deg 0 min.  The central meridian is at longitude 100 deg 0 min.  False origin is x = 0 and y = 0.  The test data is at latitude -80 deg 15 min 20.2345 sec and longitude 99 deg 20 min 12.4567 sec.

See also (class function)

geo2xy, xy2geo

| HOME | BACK |


SETLCC

| HOME | BACK |

Purpose

To set a projection object to the Lambert Conformal Conic Projection.

All angles are required and expressed in degrees.

Description and computation algorithms adopted from Snyder, J. P. (1987), Map Projections - A Working Manual.

The following is a summary of the projection.

Class

Projection

Usage

{void} object.SETLCC({double} argm1,{double} argm2,{double} argm3,{double} argm4,[{double} argm5,{double} argm6])

argm1 = latitude of origin

argm2 = longitude of central meridian (the Y-axis)

argm3 = latitude of the 1st standard parallel

argm4 = latitude of the 2nd standard parallel

argm5 = false origin X value (default = 0)

argm6 = false origin Y value (default = 0)

Example:

->p1 = projection()

->p1.setLCC(deg(31.40), deg(-98.30), deg(32.08), deg(33.58), 600000,2000000)

->e = ellipsoid()

->e.set("GRS80")

->p1.ellipsoid() = e

->pt1 = p1.geo2xy(deg(32.15207295), deg(-99.40000086))

->print pt1

     ( 490070.630 , 2065936.183)

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

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

   32 15 20.72950

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

  260 19 59.99140

->

The above example set the Lambert Conformal Conic projection's origin at  latitude 31 deg 40 min.  The central meridian is at longitude -98 deg 30 min.  The two standard parallels are at latitudes 32 deg 8 min, and 33 deg 58 min. False origin is x = 600000 and y = 2000000.  The test data is at latitude 32 deg 15 min 20.7295 sec and longitude -99 deg 40 min 00.0086 sec.

See also (class function)

geo2xy, xy2geo

| HOME | BACK |

SETLCC1

| HOME | BACK |

Purpose

To set a projection object to the Lambert Conformal Conic Projection (one parallel).  A scale factor at the central parallel has to be specified for this function.

All angles are required and expressed in degrees.

Description and computation algorithms adopted from Snyder, J. P. (1987), Map Projections - A Working Manual.

The following is a summary of the projection.

Class

Projection

Usage

{void} object.SETLCC({double} argm1,{double} argm2,{double} argm3,{double} argm4,[{double} argm5,{double} argm6])

argm1 = latitude of origin

argm2 = longitude of central meridian (the Y-axis)

argm3 = latitude of the 1st standard parallel

argm4 = scale factor at central parellel

argm5 = false origin X value (default = 0)

argm6 = false origin Y value (default = 0)

Example:

->p1 = projection()

->p1.setLCC1(deg(31.40), deg(-98.30), deg(32.08), 1.0000245, 600000,2000000)

->

->

The above example set the Lambert Conformal Conic projection's origin at  latitude 31 deg 40 min.  The central meridian is at longitude -98 deg 30 min.  The central  parallels are at latitudes 32 deg 8 min, the scale factor is 1.0000245, False origin is x = 600000 and y = 2000000. 

See also (class function)

geo2xy, xy2geo, setLCC

| HOME | BACK |


SETMERCATOR

| HOME | BACK |

Purpose

To set a projection object to the Mercator Projection.

All angles are required and expressed in degrees.

Description and computation algorithms adopted from Snyder, J. P. (1987), Map Projections - A Working Manual.

The following is a summary of the projection.

Class

Projection

Usage

{void} object.SETMERCATOR({double} argm1,{double} argm2,[{double} argm3,{double} argm4])

argm1 = longitude of central meridian (the Y-axis)

        (Note the X-axis is the Equator)

argm2 = latitude of true scale (default = 0)

argm3 = false origin X value (default = 0)

argm4 = false origin Y value (default = 0)

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)

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

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

   21 00 00.00000

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

   99 00 00.00000

->

The above example set the Mercator projection's central meridian at longitude 100 deg 0 min.  The latitude of true scale is at 20 deg.  False origin is x = 0 and y = 0.  The test data is at latitude 21deg and longitude 99 deg.

See also (class function)

geo2xy, xy2geo

| HOME | BACK |

 


SETOM

| HOME | BACK |

Purpose

To set a projection object to the Oblique Mercator Projection.

Computation algorithms adopted from Snyder, J. P. (1987), Map Projections - A Working Manual, Hotine formulas.

The following is a summary of the projection.

Class

Projection

Usage

{void} object.SETOM({double} argm1,{double} argm2, {double} argm3,{double} argm4,[{double} argm5,{double} argm6])

argm1 = latitude of the projection center

argm2 = longitude of the projection center

argm3 = Azimuth of the central line passing through the projection center

argm4 = scale factor on the central line

argm5 = false origin X value (default = 0)

argm6 = false origin Y value (default = 0)

Example:

->p1 = projection()

->p1.setOM(deg(45.55), -123, 65, 1.000, 7000000, -3000000)

->e = ellipsoid()

->e.set("GRS80")

->p1.ellipsoid() = e

->pt1 = p1.geo2xy(deg(46.121757866), deg(-123.572188345))

->print pt1

     ( 94514.720   ,   218152.786)

->

 

See also (class function)

geo2xy, xy2geo

| HOME | BACK |

 


SETORTHGPH

| HOME | BACK |

Purpose

To set a projection object to the Orthographic Projection.

This projection is used only in the spherical form, hence the radius of the sphere will be taken from the value of the semi-major axis of the defined ellipsoid.All angles are required and expressed in degrees.

Description and computation algorithms adopted from Snyder, J. P. (1987), Map Projections - A Working Manual.

The following is a summary of the projection.

Class

Projection

Usage

{void} object.SETORTHGPH({double} argm1,{double} argm2,[{double} argm3,{double} argm4])

argm1 = latitude of origin

argm2 = longitude of central meridian (the Y-axis)

argm3 = false origin X value (default = 0)

argm4 = false origin Y value (default = 0)

Example:

->p1 = projection()

->p1.setORTHGPH(-80,100)

WARNING : Orthographic projection is available only in the spherical form

WARNING : The calling ellipsoid should have zero flattening, a sphere of radius a (semi-major axis) is assumed...

->e = ellipsoid()

->e.set("CLARKE66")

->p1.ellipsoid() = e

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

->print pt1

    ( -12495.421 , -28527.001)

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

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

   -80 15 20.23450

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

    99 20 12.45670

->

The above example set the Orthographic projection's origin at  latitude 80 deg 0 min.  The central meridian is at longitude 100 deg 0 min.  False origin is x = 0 and y = 0.  The test data is at latitude -80 deg 15 min 20.2345 sec and longitude 99 deg 20 min 12.4567 sec.

See also (class function)

geo2xy, xy2geo

| HOME | BACK |


SETPOLSTRGPH

| HOME | BACK |

Purpose

To set a projection object to the Polar Stereographic Projection.

Description and computation algorithms adopted from Snyder, J. P. (1987), Map Projections - A Working Manual.

The following is a summary of the projection.

Class

Projection

Usage

{void} object.SETPLOSTRGPH({double} argm1,{double} argm2,[{double} argm3,{double} argm4])

argm1 = latitude of true scale

argm2 = longitude of central meridian (the Y-axis)

        (Note X-axis is perpendicular to Y-axis and the origin is at the pole)

argm3 = false origin X value (default = 0)

argm4 = false origin Y value (default = 0)

Example:

->p1 = projection()

->p1.setPOLSTRGPH(-80,100)

->e = ellipsoid()

->e.set("CLARKE66")

->p1.ellipsoid() = e

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

->print pt1

    ( -12531.874 , 1082606.147)

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

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

   -80 15 20.23450

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

    99 20 12.45670

->

The above example set the Polar Stereographic projection's origin at  latitude 80 deg 0 min.  The central meridian is at longitude 100 deg 0 min.  False origin is x = 0 and y = 0.  The test data is at latitude -80 deg 15 min 20.2345 sec and longitude 99 deg 20 min 12.4567 sec.

See also (class function)

geo2xy, xy2geo

| HOME | BACK |


SETSTRGPH

| HOME | BACK |

Purpose

To set a projection object to the Stereographic Projection.

Description and computation algorithms adopted from Snyder, J. P. (1987), Map Projections - A Working Manual.

The following is a summary of the projection.

Class

Projection

Usage

{void} object.SETSTRGPH({double} argm1,{double} argm2,{double} argm3,[{double} argm4,{double} argm5])

argm1 = latitude of origin

argm2 = longitude of central meridian (the Y-axis)

argm3 = scale factor at the origin

argm4 = false origin X value (default = 0)

argm5 = false origin Y value (default = 0)

Example:

->p1 = projection()

->p1.setSTRGPH(-80,100,1.00)

->e = ellipsoid()

->e.set("CLARKE66")

->p1.ellipsoid() = e

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

->print pt1

( -12536.843 , -28615.685)

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

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

-80 15 20.23450

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

99 20 12.45670

->

The above example set the Stereographic projection's origin at  latitude 80 deg 0 min.  The central meridian is at longitude 100 deg 0 min.  False origin is x = 0 and y = 0.  The test data is at latitude -80 deg 15 min 20.2345 sec and longitude 99 deg 20 min 12.4567 sec.

See also (class function)

geo2xy, xy2geo

| HOME | BACK |


SETTM

| HOME | BACK |

Purpose

To set a projection object to the Transverse Mercator Projection.

Description and computation algorithms adopted from Snyder, J. P. (1987), Map Projections - A Working Manual.

The following is a summary of the projection.

Class

Projection

Usage

{void} object.SETTM({double} argm1,{double} argm2,{double} argm3,[{double} argm4,{double} argm5])

argm1 = latitude of origin

argm2 = longitude of central meridian (the Y-axis)

argm3 = scale factor along central meridian

argm4 = false origin X value (default = 0)

argm5 = false origin Y value (default = 0)

Example:

->p1 = projection()

->p1.setTM(31,-106,0.9999,500000,0)

->e = ellipsoid()

->e.set("CLARKE66")

->p1.ellipsoid() = e

->pt1 = p1.geo2xy(deg(32.15207295), deg(-105.40000086))

->print pt1

     ( 531407.353 , 139269.107)

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

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

    32 15 20.72950

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

    254 19 59.99140

->

The above example set the Transverse Mercator projection's origin at  latitude 31 deg 0 min.  The central meridian is at longitude -106 deg 0 min.  Scale factor at central meridian is 0.9999.  False origin is x = 500,000 and y = 0.  The test data is at latitude 32 deg 15 min 20.7295 sec and longitude -105 deg 40 min 00.0086 sec.

See also (class function)

geo2xy, xy2geo

| HOME | BACK |


SETTOPOCTRC

| HOME | BACK |

Purpose

To set a projection object to the Topocentric Projection.

All angles are required and expressed in degrees.

This is in fact a  3D Cartesian coordinate, origin at a point on the earth surface, phe0 and rammda0.  Its Y-axis point toward the north direction and the X-axis is perpendicular to the Y-axis.  The utilization of this coordinate system is in Photogrammetry where aerial photos cover a very large area, hence error of the earth curvature is significant, and an intermediate true 3D Cartesian coordinate system is introduced.

The space rectangular coordinate system is used to bridge the geographic coordinate, latitude, and longitude, to X Y map projection coordinate and vice versa.  However, the Z coordinate is dropped out when the computation is done.  See more details in section Example (Geodesy and Surveying).

It is not recommended to use this coordinate system as a general map projection system, because it is not as accurate, due to lack of the third dimension information.  The sole purpose of it is to used in orthophoto generation when an topocentric must be used as an intermediate coordinate system as mentioned above.

Class

Projection

Usage

{void} object.SETTOPOCTRC({double} argm1,{double} argm2,[{double} argm3,{double} argm4])

argm1 = latitude of origin

argm2 = longitude of origin

argm3 = false origin X value (default = 0)

argm4 = false origin Y value (default = 0)

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

->

The above example set the Topocentric origin at  latitude 80 deg 0 min and longitude 100 deg 0 min.  False origin is x = 0 and y = 0.  The test data is at latitude -80 deg 15 min 20.2345 sec and longitude 99 deg 20 min 12.4567 sec.

See also (class function)

geo2xy, xy2geo

| HOME | BACK |


SETUNPROJ

| HOME | BACK |

Purpose

To set a projection object to the Un-projected Projection.

The way the projection works is just simply to assign longitude to the y coordinate and latitude to x coordinate.

Class

Projection

Usage

{void} object.SETUNPROJ()

Example:

->p1 = projection()

->p1.setUNPROJ()

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

->print pt1

  ( 99.337 , -80.256)

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

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

   -80 15 20.23450

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

    99 20 12.45670

->

The test data is at latitude -80 deg 15 min 20.2345 sec and longitude 99 deg 20 min 12.4567 sec.

See also (class function)

geo2xy, xy2geo

| HOME | BACK |


SETUTM

| HOME | BACK |

Purpose

To set a projection object to the Universal Transverse Mercator (UTM) Projection.

Description and computation algorithms adopted from Snyder, J. P. (1987), Map Projections - A Working Manual.

The following is a summary of the projection.

Class

Projection

Usage

{void} object.SETUTM({int} argm1,[{String} argm2])

argm1 = zone number (must be 1 to 60)

argm2 = Northern or Southern hemisphere (must be either "N" or "S")

        (default = "N")

Example:

->p1 = projection()

->p1.setutm(48)

->e = ellipsoid()

->e.set("EVEREST")

->p1.ellipsoid() = e

->pt1 = p1.geo2xy(deg(13.47458745), deg(109.34545893))

->print pt1

    ( 995632.458 , 1529785.236)

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

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

   13 47 45.87450

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

  109 34 54.58942

->

The above example set the Universal Transverse Mercator projection to zone 48 N .  The test data is at latitude 13 deg 47 min 45.8745 sec and longitude 109 deg 34 min 54.5893 sec.

See also (class function)

geo2xy, xy2geo

| HOME | BACK |