[GRASS-SVN] r62182 - in grass/trunk: general/g.list general/g.region gui/wxpython/gui_core lib/manage raster/r.region
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Oct 4 14:27:51 PDT 2014
Author: annakrat
Date: 2014-10-04 14:27:51 -0700 (Sat, 04 Oct 2014)
New Revision: 62182
Modified:
grass/trunk/general/g.list/main.c
grass/trunk/general/g.region/main.c
grass/trunk/gui/wxpython/gui_core/gselect.py
grass/trunk/lib/manage/element_list
grass/trunk/raster/r.region/main.c
Log:
remove unused 3dview element, keep library
Modified: grass/trunk/general/g.list/main.c
===================================================================
--- grass/trunk/general/g.list/main.c 2014-10-04 21:26:00 UTC (rev 62181)
+++ grass/trunk/general/g.list/main.c 2014-10-04 21:27:51 UTC (rev 62182)
@@ -31,7 +31,6 @@
TYPE_RAST,
TYPE_RAST3D,
TYPE_VECT,
- TYPE_3DVIEW,
TYPE_OTHERS
};
@@ -377,8 +376,6 @@
type = TYPE_RAST3D;
else if (strcmp(alias, "vect") == 0)
type = TYPE_VECT;
- else if (strcmp(alias, "3dview") == 0)
- type = TYPE_3DVIEW;
else
type = TYPE_OTHERS;
@@ -445,8 +442,6 @@
RASTER3D_Region region3d;
struct Map_info Map;
struct bound_box box;
- int ret;
- struct G_3dview view3d;
switch (type) {
case TYPE_RAST:
@@ -474,23 +469,6 @@
map_window.east = box.E;
has_region = 1;
break;
- case TYPE_3DVIEW:
- if ((ret = G_get_3dview(name, mapset, &view3d)) < 0)
- G_fatal_error(_("Unable to read 3dview file <%s@%s>"),
- name, mapset);
- if (ret == 0) {
- G_warning(_("No region support in an old 3dview file <%s@%s>. Listing anyway"),
- name, mapset);
- has_region = 0;
- }
- else {
- map_window.north = view3d.vwin.north;
- map_window.south = view3d.vwin.south;
- map_window.west = view3d.vwin.west;
- map_window.east = view3d.vwin.east;
- has_region = 1;
- }
- break;
default:
has_region = 0;
break;
Modified: grass/trunk/general/g.region/main.c
===================================================================
--- grass/trunk/general/g.region/main.c 2014-10-04 21:26:00 UTC (rev 62181)
+++ grass/trunk/general/g.region/main.c 2014-10-04 21:27:51 UTC (rev 62182)
@@ -53,7 +53,7 @@
struct Option
*north, *south, *east, *west, *top, *bottom,
*res, *nsres, *ewres, *res3, *tbres, *rows, *cols,
- *save, *region, *view, *raster, *raster3d, *align,
+ *save, *region, *raster, *raster3d, *align,
*zoom, *vect;
} parm;
@@ -184,16 +184,6 @@
parm.vect->description = NULL;
parm.vect->guisection = _("Existing");
- parm.view = G_define_option();
- parm.view->key = "3dview";
- parm.view->key_desc = "name";
- parm.view->required = NO;
- parm.view->multiple = NO;
- parm.view->type = TYPE_STRING;
- parm.view->description = _("Set region to match this 3dview file");
- parm.view->gisprompt = "old,3d.view,3d view";
- parm.view->guisection = _("Existing");
-
parm.north = G_define_option();
parm.north->key = "n";
parm.north->key_desc = "value";
@@ -405,46 +395,6 @@
G__get_window(&window, "windows", name, mapset);
}
- /* 3dview= */
- if ((name = parm.view->answer)) {
- struct G_3dview v;
- FILE *fp;
- int ret;
-
- mapset = G_find_file2("3d.view", name, "");
- if (!mapset)
- G_fatal_error(_("3dview file <%s> not found"), name);
-
- G_3dview_warning(0); /* suppress boundary mismatch warning */
-
- if (NULL == (fp = G_fopen_old("3d.view", name, mapset)))
- G_fatal_error(_("Unable to open 3dview file <%s> in <%s>"), name,
- mapset);
-
- temp_window = window;
-
- if (0 > (ret = G_get_3dview(name, mapset, &v)))
- G_fatal_error(_("Unable to read 3dview file <%s> in <%s>"), name,
- mapset);
- if (ret == 0)
- G_fatal_error(_("Old 3dview file. Region <%s> not found in <%s>"),
- name, mapset);
-
-
- window.north = v.vwin.north;
- window.south = v.vwin.south;
- window.west = v.vwin.west;
- window.east = v.vwin.east;
-
- window.rows = v.vwin.rows;
- window.cols = v.vwin.cols;
- window.ns_res = v.vwin.ns_res;
- window.ew_res = v.vwin.ew_res;
-
- fclose(fp);
-
- }
-
/* raster= */
if (parm.raster->answer) {
int first = 0;
Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py 2014-10-04 21:26:00 UTC (rev 62181)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py 2014-10-04 21:27:51 UTC (rev 62182)
@@ -445,10 +445,6 @@
'group':'group',
'imagery group':'group',
'imagery group files':'group',
- '3d.view':'3dview',
- '3dview':'3dview',
- '3D viewing parameters':'3dview',
- '3D view parameters':'3dview',
'stds':'stds',
'strds':'strds',
'str3ds':'str3ds',
Modified: grass/trunk/lib/manage/element_list
===================================================================
--- grass/trunk/lib/manage/element_list 2014-10-04 21:26:00 UTC (rev 62181)
+++ grass/trunk/lib/manage/element_list 2014-10-04 21:27:51 UTC (rev 62182)
@@ -27,4 +27,3 @@
windows:region:region definition:region definition(s)
windows3d:region3d:region3D definition:3D region definition(s)
group:group:imagery group:imagery group(s)
-3d.view:view3d:3D viewing parameters:3D view parameter(s)
Modified: grass/trunk/raster/r.region/main.c
===================================================================
--- grass/trunk/raster/r.region/main.c 2014-10-04 21:26:00 UTC (rev 62181)
+++ grass/trunk/raster/r.region/main.c 2014-10-04 21:27:51 UTC (rev 62182)
@@ -42,7 +42,7 @@
struct Option
*map,
*north, *south, *east, *west,
- *raster, *vect, *region, *view, *align;
+ *raster, *vect, *region, *align;
} parm;
G_gisinit(argv[0]);
@@ -94,16 +94,6 @@
parm.vect->description = _("Set region to match this vector map");
parm.vect->guisection = _("Existing");
- parm.view = G_define_option();
- parm.view->key = "3dview";
- parm.view->key_desc = "name";
- parm.view->required = NO;
- parm.view->multiple = NO;
- parm.view->type = TYPE_STRING;
- parm.view->description = _("Set region to match this 3dview file");
- parm.view->gisprompt = "old,3d.view,3d view";
- parm.view->guisection = _("Existing");
-
parm.north = G_define_option();
parm.north->key = "n";
parm.north->key_desc = "value";
@@ -167,33 +157,6 @@
if ((name = parm.region->answer)) /* region= */
G__get_window(&window, "windows", name, "");
- if ((name = parm.view->answer)) { /* 3dview= */
- struct G_3dview v;
- FILE *fp;
- int ret;
-
- G_3dview_warning(0); /* suppress boundary mismatch warning */
-
- fp = G_fopen_old("3d.view", name, "");
- if (!fp)
- G_fatal_error(_("Unable to open 3dview file <%s>"), name);
-
- ret = G_get_3dview(name, "", &v);
- if (ret < 0)
- G_fatal_error(_("Unable to read 3dview file <%s>"), name);
- if (ret == 0)
- G_fatal_error(_("Old 3dview file. Region <%s> not found"), name);
-
-
- window.north = v.vwin.north;
- window.south = v.vwin.south;
- window.west = v.vwin.west;
- window.east = v.vwin.east;
-
- fclose(fp);
-
- }
-
if ((name = parm.raster->answer)) { /* raster= */
Rast_get_cellhd(name, "", &window);
}
More information about the grass-commit
mailing list