|
@@ -28,7 +28,7 @@ int main(int argc, char *argv[])
|
|
struct Categories cats;
|
|
struct Categories cats;
|
|
struct FPRange range;
|
|
struct FPRange range;
|
|
DCELL min, max;
|
|
DCELL min, max;
|
|
- int fp;
|
|
|
|
|
|
+ RASTER_MAP_TYPE map_type;
|
|
char buf[1024];
|
|
char buf[1024];
|
|
RULE *rules, *tail;
|
|
RULE *rules, *tail;
|
|
int any;
|
|
int any;
|
|
@@ -92,7 +92,7 @@ int main(int argc, char *argv[])
|
|
tty = isatty(fileno(srcfp));
|
|
tty = isatty(fileno(srcfp));
|
|
|
|
|
|
Rast_init_cats("", &cats);
|
|
Rast_init_cats("", &cats);
|
|
- fp = Rast_map_is_fp(parm.input->answer, old_mapset);
|
|
|
|
|
|
+ map_type = Rast_map_type(parm.input->answer, old_mapset);
|
|
Rast_read_fp_range(parm.input->answer, old_mapset, &range);
|
|
Rast_read_fp_range(parm.input->answer, old_mapset, &range);
|
|
Rast_get_fp_range_min_max(&range, &min, &max);
|
|
Rast_get_fp_range_min_max(&range, &min, &max);
|
|
rules = tail = NULL;
|
|
rules = tail = NULL;
|
|
@@ -101,11 +101,14 @@ int main(int argc, char *argv[])
|
|
if (tty) {
|
|
if (tty) {
|
|
fprintf(stdout,
|
|
fprintf(stdout,
|
|
_("Enter rule(s), \"end\" when done, \"help\" if you need it\n"));
|
|
_("Enter rule(s), \"end\" when done, \"help\" if you need it\n"));
|
|
- if (fp)
|
|
|
|
- fprintf(stdout, _("fp: Data range is %.25f to %.25f\n"),
|
|
|
|
|
|
+ if (map_type == FCELL_TYPE)
|
|
|
|
+ fprintf(stdout, _("FCELL: Data range is %.7g to %.7g\n"),
|
|
|
|
+ (double)min, (double)max);
|
|
|
|
+ else if (map_type == DCELL_TYPE)
|
|
|
|
+ fprintf(stdout, _("DCELL: Data range is %.15g to %.15g\n"),
|
|
(double)min, (double)max);
|
|
(double)min, (double)max);
|
|
else
|
|
else
|
|
- fprintf(stdout, _("Data range is %ld to %ld\n"), (long)min,
|
|
|
|
|
|
+ fprintf(stdout, _("CELL: Data range is %ld to %ld\n"), (long)min,
|
|
(long)max);
|
|
(long)max);
|
|
}
|
|
}
|
|
|
|
|