21 region2d->proj = region3d->proj;
22 region2d->zone = region3d->zone;
24 region2d->north = region3d->north;
25 region2d->south = region3d->south;
26 region2d->east = region3d->east;
27 region2d->west = region3d->west;
29 region2d->rows = region3d->rows;
30 region2d->cols = region3d->cols;
32 region2d->ns_res = region3d->ns_res;
33 region2d->ew_res = region3d->ew_res;
48 region2d->proj = region3d->proj;
49 region2d->zone = region3d->zone;
51 region2d->north = region3d->north;
52 region2d->south = region3d->south;
53 region2d->east = region3d->east;
54 region2d->west = region3d->west;
55 region2d->top = region3d->top;
56 region2d->bottom = region3d->bottom;
58 region2d->rows = region3d->rows;
59 region2d->rows3 = region3d->rows;
60 region2d->cols = region3d->cols;
61 region2d->cols3 = region3d->cols;
62 region2d->depths = region3d->depths;
64 region2d->ns_res = region3d->ns_res;
65 region2d->ns_res3 = region3d->ns_res;
66 region2d->ew_res = region3d->ew_res;
67 region2d->ew_res3 = region3d->ew_res;
68 region2d->tb_res = region3d->tb_res;
88 region3d->proj = region2d->proj;
89 region3d->zone = region2d->zone;
91 region3d->north = region2d->north;
92 region3d->south = region2d->south;
93 region3d->east = region2d->east;
94 region3d->west = region2d->west;
96 region3d->rows = region2d->rows;
97 region3d->cols = region2d->cols;
99 region3d->ns_res = region2d->ns_res;
100 region3d->ew_res = region2d->ew_res;
117 region3d->proj = region2d->proj;
118 region3d->zone = region2d->zone;
120 region3d->north = region2d->north;
121 region3d->south = region2d->south;
122 region3d->east = region2d->east;
123 region3d->west = region2d->west;
124 region3d->top = region2d->top;
125 region3d->bottom = region2d->bottom;
127 region3d->rows = region2d->rows3;
128 region3d->cols = region2d->cols3;
129 region3d->depths = region2d->depths;
131 region3d->ns_res = region2d->ns_res3;
132 region3d->ew_res = region2d->ew_res3;
133 region3d->tb_res = region2d->tb_res;
151 struct Cell_head region2d;
160 if (region->depths <= 0)
162 region->tb_res = (region->top - region->bottom) / region->depths;
180 struct Cell_head region2d;
189 if (region->tb_res <= 0)
192 region->depths = (region->top - region->bottom + region->tb_res / 2.0) /
194 if (region->depths == 0)
215 G_copy(regionDest, regionSrc,
sizeof(G3D_Region));
246 row = map->region.rows -
247 (north - map->region.south) / (map->region.north -
248 map->region.south) * map->region.rows;
250 (east - map->region.west) / (map->region.east -
251 map->region.west) * map->region.cols;
253 (top - map->region.bottom) / (map->region.top -
254 map->region.bottom) *
258 if ((row < 0) || (row >= map->region.rows) ||
259 (col < 0) || (col >= map->region.cols) ||
260 (depth < 0) || (depth >= map->region.depths)) {
266 map->resampleFun(map, row, col, depth, value, type);
274 char fullName[GPATH_MAX];
275 char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
278 G3d_filename(fullName, G3D_HEADER_ELEMENT, xname, xmapset);
280 if (!mapset || !*mapset)
282 G3d_filename(fullName, G3D_HEADER_ELEMENT, name, mapset);