|
@@ -547,49 +547,49 @@ void mv_driver()
|
|
|
maps. All maps currently are double,
|
|
|
rather than floating point or int */
|
|
|
if (choice->att[1]) {
|
|
|
- if (G_find_cell("a1", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("a1", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=a1,a1bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
a1 = Rast_open_new("a1", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->att[2]) {
|
|
|
- if (G_find_cell("a2", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("a2", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=a2,a2bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
a2 = Rast_open_new("a2", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->att[3]) {
|
|
|
- if (G_find_cell("a3", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("a3", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=a3,a3bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
a3 = Rast_open_new("a3", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->att[4]) {
|
|
|
- if (G_find_cell("a4", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("a4", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=a4,a4bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
a4 = Rast_open_new("a4", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->att[5]) {
|
|
|
- if (G_find_cell("a5", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("a5", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=a5,a5bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
a5 = Rast_open_new("a5", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->att[6]) {
|
|
|
- if (G_find_cell("a6", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("a6", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=a6,a6bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
a6 = Rast_open_new("a6", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->att[7]) {
|
|
|
- if (G_find_cell("a7", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("a7", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=a7,a7bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
@@ -597,7 +597,7 @@ void mv_driver()
|
|
|
}
|
|
|
|
|
|
if (choice->att[8]) {
|
|
|
- if (G_find_cell("a8", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("a8", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=a8,a8bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
@@ -605,42 +605,42 @@ void mv_driver()
|
|
|
}
|
|
|
|
|
|
if (choice->size[1]) {
|
|
|
- if (G_find_cell("s1", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("s1", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=s1,s1bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
s1 = Rast_open_new("s1", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->size[2]) {
|
|
|
- if (G_find_cell("s2", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("s2", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=s2,s2bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
s2 = Rast_open_new("s2", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->size[3]) {
|
|
|
- if (G_find_cell("s3", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("s3", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=s3,s3bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
s3 = Rast_open_new("s3", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->size[4]) {
|
|
|
- if (G_find_cell("s4", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("s4", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=s4,s4bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
s4 = Rast_open_new("s4", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->size[5]) {
|
|
|
- if (G_find_cell("s5", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("s5", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=s5,s5bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
s5 = Rast_open_new("s5", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->size[6]) {
|
|
|
- if (G_find_cell("s6", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("s6", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=s6,s6bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
@@ -648,7 +648,7 @@ void mv_driver()
|
|
|
}
|
|
|
|
|
|
if (choice->size[7]) {
|
|
|
- if (G_find_cell("s7", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("s7", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=s7,s7bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
@@ -656,7 +656,7 @@ void mv_driver()
|
|
|
}
|
|
|
|
|
|
if (choice->size[8]) {
|
|
|
- if (G_find_cell("s8", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("s8", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=s8,s8bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
@@ -664,70 +664,70 @@ void mv_driver()
|
|
|
}
|
|
|
|
|
|
if (choice->core[1]) {
|
|
|
- if (G_find_cell("c1", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("c1", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=c1,c1bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
c1 = Rast_open_new("c1", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->core[2]) {
|
|
|
- if (G_find_cell("c2", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("c2", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=c2,c2bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
c2 = Rast_open_new("c2", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->core[3]) {
|
|
|
- if (G_find_cell("c3", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("c3", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=c3,c3bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
c3 = Rast_open_new("c3", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->core[4]) {
|
|
|
- if (G_find_cell("c4", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("c4", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=c4,c4bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
c4 = Rast_open_new("c4", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->core[5]) {
|
|
|
- if (G_find_cell("c5", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("c5", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=c5,c5bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
c5 = Rast_open_new("c5", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->core[6]) {
|
|
|
- if (G_find_cell("c6", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("c6", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=c6,c6bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
c6 = Rast_open_new("c6", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->core[7]) {
|
|
|
- if (G_find_cell("c7", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("c7", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=c7,c7bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
c7 = Rast_open_new("c7", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->core[8]) {
|
|
|
- if (G_find_cell("c8", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("c8", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=c8,c8bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
c8 = Rast_open_new("c8", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->core[9]) {
|
|
|
- if (G_find_cell("c9", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("c9", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=c9,c9bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
c9 = Rast_open_new("c9", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->core[10]) {
|
|
|
- if (G_find_cell("c10", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("c10", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=c10,c10bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
@@ -735,42 +735,42 @@ void mv_driver()
|
|
|
}
|
|
|
|
|
|
if (choice->shape[1]) {
|
|
|
- if (G_find_cell("h1", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("h1", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=h1,h1bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
h1 = Rast_open_new("h1", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->shape[2]) {
|
|
|
- if (G_find_cell("h2", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("h2", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=h2,h2bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
h2 = Rast_open_new("h2", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->shape[3]) {
|
|
|
- if (G_find_cell("h3", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("h3", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=h3,h3bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
h3 = Rast_open_new("h3", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->shape[4]) {
|
|
|
- if (G_find_cell("h4", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("h4", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=h4,h4bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
h4 = Rast_open_new("h4", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->shape[5]) {
|
|
|
- if (G_find_cell("h5", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("h5", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=h5,h5bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
h5 = Rast_open_new("h5", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->shape[6]) {
|
|
|
- if (G_find_cell("h6", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("h6", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=h6,h6bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
@@ -778,7 +778,7 @@ void mv_driver()
|
|
|
}
|
|
|
|
|
|
if (choice->boundary[1]) {
|
|
|
- if (G_find_cell("n1", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("n1", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=n1,n1bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
@@ -786,7 +786,7 @@ void mv_driver()
|
|
|
}
|
|
|
|
|
|
if (choice->boundary[2]) {
|
|
|
- if (G_find_cell("n2", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("n2", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=n2,n2bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
@@ -794,7 +794,7 @@ void mv_driver()
|
|
|
}
|
|
|
|
|
|
if (choice->boundary[3]) {
|
|
|
- if (G_find_cell("n3", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("n3", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=n3,n3bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
@@ -802,7 +802,7 @@ void mv_driver()
|
|
|
}
|
|
|
|
|
|
if (choice->boundary[4]) {
|
|
|
- if (G_find_cell("n4", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("n4", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=n4,n4bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
@@ -810,42 +810,42 @@ void mv_driver()
|
|
|
}
|
|
|
|
|
|
if (choice->perim[1]) {
|
|
|
- if (G_find_cell("p1", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("p1", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=p1,p1bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
p1 = Rast_open_new("p1", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->perim[2]) {
|
|
|
- if (G_find_cell("p2", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("p2", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=p2,p2bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
p2 = Rast_open_new("p2", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->perim[3]) {
|
|
|
- if (G_find_cell("p3", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("p3", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=p3,p3bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
p3 = Rast_open_new("p3", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->perim[4]) {
|
|
|
- if (G_find_cell("p4", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("p4", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=p4,p4bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
p4 = Rast_open_new("p4", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->perim[5]) {
|
|
|
- if (G_find_cell("p5", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("p5", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=p5,p5bak");
|
|
|
system(cmdbuf);
|
|
|
}
|
|
|
p5 = Rast_open_new("p5", DCELL_TYPE);
|
|
|
}
|
|
|
if (choice->perim[6]) {
|
|
|
- if (G_find_cell("p6", G_mapset()) != NULL) {
|
|
|
+ if (G_find_raster("p6", G_mapset()) != NULL) {
|
|
|
sprintf(cmdbuf, "%s %s", "g.rename -o", "rast=p6,p6bak");
|
|
|
system(cmdbuf);
|
|
|
}
|