29 #include <grass/gis.h>
44 struct Cell_head *wind,
45 struct Key_Value *proj_info,
46 struct Key_Value *proj_units, FILE * report_file)
52 sprintf(path,
"%s/%s",
G_gisdbase(), location_name);
57 sprintf(path,
"%s/%s/%s",
G_gisdbase(), location_name,
"PERMANENT");
62 G__setenv(
"LOCATION_NAME", location_name);
70 if (proj_info !=
NULL) {
77 if (proj_units !=
NULL) {
123 struct Cell_head *wind,
124 struct Key_Value *proj_info,
125 struct Key_Value *proj_units, FILE * report_file)
136 perror(
"G_make_location");
167 const struct Key_Value *proj_units1,
168 const struct Key_Value *proj_info2,
169 const struct Key_Value *proj_units2)
171 const char *proj1, *proj2;
173 if (proj_info1 ==
NULL && proj_info2 ==
NULL)
180 if (proj_info1 ==
NULL || proj_info2 ==
NULL)
186 if (proj1 ==
NULL || proj2 ==
NULL || strcmp(proj1, proj2))
193 if (proj_units1 ==
NULL && proj_units2 ==
NULL)
196 if (proj_units1 ==
NULL || proj_units2 ==
NULL)
200 double a1 = 0, a2 = 0;
207 if (a1 && a2 && (fabs(a2 - a1) > 0.000001))
217 double a1 = 0, a2 = 0;
224 if (a1 && a2 && (fabs(a2 - a1) > 0.000001))
231 if (!strcmp(proj1,
"utm") && !strcmp(proj2,
"utm")
239 if (!strcmp(proj1,
"utm") && !strcmp(proj2,
"utm")
254 if (x_0_1 && x_0_2 && (fabs(atof(x_0_1) - atof(x_0_2)) > 0.000001))
268 if (y_0_1 && y_0_2 && (fabs(atof(y_0_1) - atof(y_0_2)) > 0.000001))