Stores a submap of the netcdf GRD data.
- Parameters
-
| xcenter | The X (Easting in meters) center coordinate provided by user |
| ycenter | The Y (Northing in meters) center coordinate provided by user |
| xpts | A pointer to a 1D array of the easting coordinate variable data |
| xdimlen | The number of values in x |
| ypts | A pointer to a 1D array of the northing coordinate variable data |
| ydimlen | The number of values in y |
| z | A pointer to a submap sized (ydimlen, xdimlen) |
| status | THe status of the structure |
This structure stores a submap retrieved from a GMT GRD file. Functions for working with this file are mapdata_fill and mapdata_free. Here's a code snippet that shows accessing the array:
struct mapdata data
float *z;
float value;
int i, j;
z = data->z;
i = data->ydimlen;
j = data->xdimlen;
for (i = 0; i < rows; i++) {
for (j = 0; j < columns; j++) {
value = z[i * columns + j];
fprintf(stdout, "%f\t", value);
}
fprintf(stdout, "\n");
}