23#define MULTIPLY_LOOP(x, y, c, m) \
25 for (i = 0; i < c; ++i) { \
31#define DIVIDE_LOOP(x, y, c, m) \
33 for (i = 0; i < c; ++i) { \
40 double *ymin,
double *ymax)
121 for (i = 0; i < 20; i++) {
126 y[i + 20] = window.
south;
128 x[i + 40] = window.
west;
131 x[i + 60] = window.
east;
135 y[80] = window.
north;
137 y[81] = window.
south;
139 y[82] = window.
north;
141 y[83] = window.
south;
142 x[84] = (window.
west + window.
east) / 2.;
150 *xmin = *xmax =
x[84];
151 *ymin = *ymax = y[84];
152 for (i = 0; i < 84; i++) {
171 else if (*xmax > 180 && *xmin > -180 && *xmax - 360 < *xmin) {
178 G_debug(1,
"input window east: %.8f", window.
east);
179 G_debug(1,
"input window west: %.8f", window.
west);
181 G_debug(1,
"transformed xmin: %.8f", *xmin);
182 G_debug(1,
"transformed xmax: %.8f", *xmax);
183 G_debug(1,
"transformed ymin: %.8f", *ymin);
184 G_debug(1,
"transformed ymax: %.8f", *ymax);
190 if (
fabs(*xmin) > 180) {
191 G_warning(
_(
"Invalid west longitude %g"), *xmin);
194 if (
fabs(*xmax) > 180) {
195 G_warning(
_(
"Invalid east longitude %g"), *xmax);
198 if (
fabs(*ymin) > 90) {
199 G_warning(
_(
"Invalid south latitude %g"), *ymin);
202 if (
fabs(*ymax) > 90) {
203 G_warning(
_(
"Invalid north latitude %g"), *ymax);
207 G_warning(
_(
"South %g is larger than north %g"), *ymin, *ymax);
211 G_debug(1,
"get_pj_area(): xmin %g, xmax %g, ymin %g, ymax %g", *xmin,
212 *xmax, *ymin, *ymax);
447 "A custom pipeline requires input and output projection info"));
475 _(
"The transformation pipeline contains an '%s' step. "
476 "Remove this step if easting and northing are swapped in "
528 double xmin, xmax, ymin, ymax;
540 G_warning(
_(
"Unable to determine area of interest for '%s'"),
620 G_warning(
_(
"proj_normalize_for_visualization() failed for "
672 "with the %s option"),
775 G_debug(1,
"proj_create_crs_to_crs() succeeded with PROJ%d",
794 _(
"proj_normalize_for_visualization() failed for '%s'"),
807 G_warning(
_(
"No PROJ definition for normalized version "
870 double *y,
double *z)
962 G_debug(1,
"c.xyzt.x: %g", c.xyzt.x);
963 G_debug(1,
"c.xyzt.y: %g", c.xyzt.y);
964 G_debug(1,
"c.xyzt.z: %g", c.xyzt.z);
1030 double *y,
double *z,
int n)
1099 for (i = 0; i < n; i++)
1114 for (i = 0; i < n; i++) {
1140 for (i = 0; i < n; i++) {
1164 for (i = 0; i < n; i++) {
1184 for (i = 0; i < n; i++) {
1338 for (i = 0; i <
count; ++i)
1346 for (i = 0; i <
count; i++) {
1360 for (i = 0; i <
count; i++) {
1377 for (i = 0; i <
count; i++) {
1391 for (i = 0; i <
count; i++) {
void G_free(void *)
Free allocated memory.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_warning(const char *,...) __attribute__((format(printf
void G_get_set_window(struct Cell_head *)
Get the current working window (region)
char * G_store_upper(const char *)
Copy string to allocated memory and convert copied string to upper case.
void void void G_important_message(const char *,...) __attribute__((format(printf
int G_asprintf(char **, const char *,...) __attribute__((format(printf
char * G_store(const char *)
Copy string to allocated memory.
int G_debug(int, const char *,...) __attribute__((format(printf
int GPJ_transform(const struct pj_info *info_in, const struct pj_info *info_out, const struct pj_info *info_trans, int dir, double *x, double *y, double *z)
Re-project a point between two co-ordinate systems using a transformation object prepared with GPJ_pr...
char * get_pj_type_string(PJ *pj)
int pj_do_proj(double *x, double *y, const struct pj_info *info_in, const struct pj_info *info_out)
Re-project a point between two co-ordinate systems.
int pj_do_transform(int count, double *x, double *y, double *h, const struct pj_info *info_in, const struct pj_info *info_out)
Re-project an array of points between two co-ordinate systems with optional ellipsoidal height conver...
int get_pj_area(const struct pj_info *iproj, double *xmin, double *xmax, double *ymin, double *ymax)
int GPJ_transform_array(const struct pj_info *info_in, const struct pj_info *info_out, const struct pj_info *info_trans, int dir, double *x, double *y, double *z, int n)
Re-project an array of points between two co-ordinate systems using a transformation object prepared ...
PJ * get_pj_object(const struct pj_info *in_gpj, char **in_defstr)
int GPJ_init_transform(const struct pj_info *info_in, const struct pj_info *info_out, struct pj_info *info_trans)
Create a PROJ transformation object to transform coordinates from an input SRS to an output SRS.
#define PROJECTION_LL
Projection code - Latitude-Longitude.
2D/3D raster map header (used also for region)
double north
Extent coordinates (north)
double east
Extent coordinates (east)
double south
Extent coordinates (south)
double west
Extent coordinates (west)