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");
165 const struct Key_Value *proj_units1,
166 const struct Key_Value *proj_info2,
167 const struct Key_Value *proj_units2)
169 const char *proj1, *proj2;
171 if (proj_info1 ==
NULL && proj_info2 ==
NULL)
178 if (proj_info1 ==
NULL || proj_info2 ==
NULL)
184 if (proj1 ==
NULL || proj2 ==
NULL || strcmp(proj1, proj2))
191 if (proj_units1 ==
NULL && proj_units2 ==
NULL)
194 if (proj_units1 ==
NULL || proj_units2 ==
NULL)
198 double a1 = 0, a2 = 0;
205 if (a1 && a2 && (fabs(a2 - a1) > 0.000001))
215 double a1 = 0, a2 = 0;
222 if (a1 && a2 && (fabs(a2 - a1) > 0.000001))
229 if (!strcmp(proj1,
"utm") && !strcmp(proj2,
"utm")
244 if (x_0_1 && x_0_2 && (fabs(atof(x_0_1) - atof(x_0_2)) > 0.000001))
258 if (y_0_1 && y_0_2 && (fabs(atof(y_0_1) - atof(y_0_2)) > 0.000001))