Projection Class Function Manual |
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)
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
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)
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)
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)
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 extension is omitted, the function will add default extension to the file. 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
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)
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
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
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.
|
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
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 thedirection of meridian (offen called "h") and parallel(often called "k").
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 = h, 1 = k
(default = 0)
Example:
->p1 = Projection() ->p1.setUTM(19) ->p1.sf(10,291) ans = 0.99960 |
See also (class function)
xy2geo, geo2xy
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() |
See also (class function)
phe0, ramda0, stadlat1, stdlat2
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
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
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
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
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
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
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
Purpose
To compute the values of scale factors at a list of points, given by a VecPt2D object, of the current map projection object. Please note some map projections have a different scale factor in thedirection of meridian (offen called "h") and parallel(often called "k").
Class
Projection
Usage
{Vector} ret = object.VECSF({VecPt2D} argm1, [{int} argm2])
argm1 = VecPt2D contains a list of 2D points (latitude and longitude)
argm2 = flag for direction, 0 = h, 1 = k
(default = 0)
Example:
->V = Vecpt2d() |
See also (class function)
sf
VECXY2GEO
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
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
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
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() |
See also (class function)
phe0, ramda0, stadlat1, stdlat2
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
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() |
See also (class function)
phe0, ramda0, stadlat1, stdlat2