GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
GProj library - Functions for re-projecting point data. More...
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <grass/gis.h>
#include <grass/gprojects.h>
#include <grass/glocale.h>
Go to the source code of this file.
Macros | |
#define | MULTIPLY_LOOP(x, y, c, m) |
#define | DIVIDE_LOOP(x, y, c, m) |
Functions | |
int | pj_do_proj (double *x, double *y, struct pj_info *info_in, struct pj_info *info_out) |
Re-project a point between two co-ordinate systems. More... | |
int | pj_do_transform (int count, double *x, double *y, double *h, struct pj_info *info_in, struct pj_info *info_out) |
Re-project an array of points between two co-ordinate systems with optional ellipsoidal height conversion. More... | |
GProj library - Functions for re-projecting point data.
(C) 2003-2008 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file do_proj.c.
#define DIVIDE_LOOP | ( | x, | |
y, | |||
c, | |||
m | |||
) |
#define MULTIPLY_LOOP | ( | x, | |
y, | |||
c, | |||
m | |||
) |
int pj_do_proj | ( | double * | x, |
double * | y, | ||
struct pj_info * | info_in, | ||
struct pj_info * | info_out | ||
) |
Re-project a point between two co-ordinate systems.
This function takes pointers to two pj_info structures as arguments, and projects a point between the co-ordinate systems represented by them. The easting and northing of the point are contained in two pointers passed to the function; these will be overwritten by the co-ordinates of the re-projected point.
x | Pointer to a double containing easting or longitude |
y | Pointer to a double containing northing or latitude |
info_in | pointer to pj_info struct for input co-ordinate system |
info_out | pointer to pj_info struct for output co-ordinate system |
Definition at line 63 of file do_proj.c.
References G_warning(), and dialogs::h.
int pj_do_transform | ( | int | count, |
double * | x, | ||
double * | y, | ||
double * | h, | ||
struct pj_info * | info_in, | ||
struct pj_info * | info_out | ||
) |
Re-project an array of points between two co-ordinate systems with optional ellipsoidal height conversion.
This function takes pointers to two pj_info structures as arguments, and projects an array of points between the co-ordinate systems represented by them. Pointers to the three arrays of easting, northing, and ellipsoidal height of the point (this one may be NULL) are passed to the function; these will be overwritten by the co-ordinates of the re-projected points.
count | Number of points in the arrays to be transformed |
x | Pointer to an array of type double containing easting or longitude |
y | Pointer to an array of type double containing northing or latitude |
h | Pointer to an array of type double containing ellipsoidal height. May be null in which case a two-dimensional re-projection will be done |
info_in | pointer to pj_info struct for input co-ordinate system |
info_out | pointer to pj_info struct for output co-ordinate system |
Definition at line 134 of file do_proj.c.
References count, DIVIDE_LOOP, G_free(), G_warning(), MULTIPLY_LOOP, and NULL.