这篇教程C++ G_mapset函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中G_mapset函数的典型用法代码示例。如果您正苦于以下问题:C++ G_mapset函数的具体用法?C++ G_mapset怎么用?C++ G_mapset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了G_mapset函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: update_default_windowvoid update_default_window(struct Cell_head *cellhd){ /* -------------------------------------------------------------------- */ /* Extend current window based on dataset. */ /* -------------------------------------------------------------------- */ struct Cell_head cur_wind; if (strcmp(G_mapset(), "PERMANENT") == 0) /* fixme: expand WIND and DEFAULT_WIND independently. (currently WIND gets forgotten and DEFAULT_WIND is expanded for both) */ G_get_default_window(&cur_wind); else G_get_window(&cur_wind); cur_wind.north = MAX(cur_wind.north, cellhd->north); cur_wind.south = MIN(cur_wind.south, cellhd->south); cur_wind.west = MIN(cur_wind.west, cellhd->west); cur_wind.east = MAX(cur_wind.east, cellhd->east); cur_wind.rows = (int)ceil((cur_wind.north - cur_wind.south) / cur_wind.ns_res); cur_wind.south = cur_wind.north - cur_wind.rows * cur_wind.ns_res; cur_wind.cols = (int)ceil((cur_wind.east - cur_wind.west) / cur_wind.ew_res); cur_wind.east = cur_wind.west + cur_wind.cols * cur_wind.ew_res; if (strcmp(G_mapset(), "PERMANENT") == 0) { G_put_element_window(&cur_wind, "", "DEFAULT_WIND"); G_message(_("Default region for this location updated")); } G_put_window(&cur_wind); G_message(_("Region for the current mapset updated"));}
开发者ID:rashadkm,项目名称:grass_cmake,代码行数:35,
示例2: I_get_con_pointsint I_get_con_points(char *group, struct Ortho_Control_Points *cp){ FILE *fd; char msg[100]; int stat; fd = I_fopen_group_file_old(group, POINT_FILE); if (fd == NULL) { sprintf(msg, "unable to open control point (Z) file for group [%s in %s]", group, G_mapset()); G_warning(msg); G_sleep(4); return 0; } stat = I_read_con_points(fd, cp); fclose(fd); if (stat < 0) { sprintf(msg, "bad format in control point file for group [%s in %s]", group, G_mapset()); G_warning(msg); G_sleep(4); return 0; } return 1;}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:27,
示例3: I_get_ref_pointsint I_get_ref_points(char *groupname, struct Ortho_Photo_Points *cp){ FILE *fd; char msg[100]; int stat; /*fprintf (stderr, "Try to f_open_group_file_old /n"); */ fd = I_fopen_group_file_old(groupname, REF_POINT_FILE); if (fd == NULL) { sprintf(msg, "unable to open reference point file for group [%s in %s]", groupname, G_mapset()); G_warning(msg); return 0; } /*fprintf (stderr, "Try to read_ref_points /n"); */ stat = I_read_ref_points(fd, cp); fclose(fd); if (stat < 0) { sprintf(msg, "bad format in reference point file for group [%s in %s]", groupname, G_mapset()); G_warning(msg); return 0; } return 1;}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:28,
示例4: read_rangeint read_range(void){ struct FPRange drange; struct Range range; CELL tmp_min, tmp_max; DCELL tmp_dmin, tmp_dmax; char buff[1024]; int i; /* read the fpranges and ranges of all input maps */ for (i = 0; i < noi; i++) { if (Rast_read_fp_range(name[i], G_mapset(), &drange) <= 0) { sprintf(buff, "Can't read f_range for map %s", name[i]); G_fatal_error("%s", buff); } Rast_get_fp_range_min_max(&drange, &tmp_dmin, &tmp_dmax); if (Rast_read_range(name[i], G_mapset(), &range) <= 0) { sprintf(buff, "Can't read range for map %s", name[i]); G_fatal_error("%s", buff); } Rast_get_range_min_max(&range, &tmp_min, &tmp_max); if (!i || tmp_max > old_max || Rast_is_c_null_value(&old_max)) old_max = tmp_max; if (!i || tmp_min < old_min || Rast_is_c_null_value(&old_min)) old_min = tmp_min; if (!i || tmp_dmax > old_dmax || Rast_is_d_null_value(&old_dmax)) old_dmax = tmp_dmax; if (!i || tmp_dmin < old_dmin || Rast_is_d_null_value(&old_dmin)) old_dmin = tmp_dmin; } /* for loop */ return 0;}
开发者ID:rkrug,项目名称:grass-ci,代码行数:34,
示例5: fft_colorsstatic void fft_colors(const char *name){ struct Colors colors; struct FPRange range; DCELL min, max; /* make a real component color table */ Rast_read_fp_range(name, G_mapset(), &range); Rast_get_fp_range_min_max(&range, &min, &max); Rast_make_grey_scale_fp_colors(&colors, min, max); Rast_write_colors(name, G_mapset(), &colors);}
开发者ID:felipebetancur,项目名称:grass-ci,代码行数:12,
示例6: misc_write_line/*! * /brief Write a line to a raster map metadata file * * Write (including overwrite) a string into a raster map's metadata file * found in in cell_misc/ in the current mapset. * * /param element metadata component filename * /param name * /param *str string containing data to be written */static void misc_write_line(const char *elem, const char *name, const char *str){ FILE *fp; fp = G_fopen_new_misc("cell_misc", elem, name); if (!fp) G_fatal_error(_("Unable to create <%s> metadata file for raster map <%[email C++ G_message函数代码示例 C++ G_gisinit函数代码示例
|