11 struct Cell_head window;
21 "To create a new LOCATION, you will need the following information:\n");
22 fprintf(stderr,
"\n");
23 fprintf(stderr,
"1. The coordinate system for the database\n");
25 fprintf(stderr,
" %s (for imagery and other unreferenced data)\n",
30 fprintf(stderr,
"2. The zone for the %s database\n",
33 " and all the necessary parameters for projections other than\n");
38 "3. The coordinates of the area to become the default region\n");
39 fprintf(stderr,
" and the grid resolution of this region\n");
41 "4. A short, one-line description or title for the location\n");
42 fprintf(stderr,
"\n");
44 if (!
G_yes(
"Do you have all this information? ", 1))
47 G_zero(&window,
sizeof(window));
51 "Please specify the coordinate system for location <%s>\n\n",
57 fprintf(stderr,
"RETURN to cancel\n");
58 fprintf(stderr,
"\n");
59 fprintf(stderr,
"> ");
65 if (sscanf(buf,
"%c", &c) != 1)
98 fprintf(stderr,
"\n");
99 sprintf(buf,
"\n%s coordinate system? ", name);
134 "Please enter a one line description for location <%s>\n\n",
136 fprintf(stderr,
"> ");
140 buf[
sizeof(myname)] = 0;
143 "=====================================================\n");
144 fprintf(stderr,
"%s\n", buf);
146 "=====================================================\n");
147 if (
G_yes(
"ok? ", *buf != 0))
156 mapset =
"PERMANENT";
158 G__setenv(
"LOCATION_NAME", location_name);
160 sprintf(buf,
"%s/%s", gisdbase, location_name);
163 sprintf(buf,
"%s/%s/%s", gisdbase, location_name, mapset);
189 sprintf(buf,
"%s/%s/%s/MYNAME", gisdbase, location_name, mapset);
190 fp = fopen(buf,
"w");