18 #include <grass/gis.h>
22 #define alloc_index(n) (COLUMN_MAPPING *) G_malloc((n)*sizeof(COLUMN_MAPPING))
64 while (west > fcb->
cellhd.west + 360.0)
66 while (west < fcb->
cellhd.west)
71 C2 = (west - fcb->
cellhd.west +
77 if (x < 0 || x >= fcb->
cellhd.cols)
86 C2 = (west - 360.0 - fcb->
cellhd.west +
92 if (x < 0 || x >= fcb->
cellhd.cols)
131 return (window->north - north) / window->ns_res;
151 while (east > west + 360.0)
176 if (window->proj == PROJECTION_LL) {
178 if (east > window->east && east == window->west + 360)
202 return (east - window->west) / window->ew_res;
225 return window->north - row * window->ns_res;
245 return window->west + col * window->ew_res;
357 f = row * fcb->
C1 + fcb->
C2;
363 f = row * fcb->
C1 + fcb->
C2;
void G_free(void *buf)
Free allocated memory.
double G_easting_to_col(double east, const struct Cell_head *window)
Easting to column.
double G_adjust_east_longitude(double east, double west)
Adjust east longitude.
int G_row_repeat_nomask(int fd, int row)
Loops rows until mismatch?.
double G_row_to_northing(double row, const struct Cell_head *window)
Row to northing.
double G_col_to_easting(double col, const struct Cell_head *window)
Column to easting.
int G_get_window(struct Cell_head *window)
read the database region
int G_window_cols(void)
Number of columns in active window.
struct fileinfo * fileinfo
int G_debug(int level, const char *msg,...)
Print debugging message.
double G_northing_to_row(double north, const struct Cell_head *window)
Northing to row.
int G__create_window_mapping(int fd)
Create window mapping.
int G__init_window(void)
Initialize window.
double G_adjust_easting(double east, const struct Cell_head *window)
Returns east larger than west.
int G_window_rows(void)
Number of rows in active window.