21#include <SpatialRange.h>
25void usage(
const char *name) {
26 cerr << name <<
" [-v -c -a <lat center> -o <lon center> -r <radius> -l <level>] | -h" << endl;
29int main(
int argc,
char *argv[]) {
35 float64 latDegrees = 0.0, lonDegrees = 0.0, radius_degrees = 0.5;
36 int force_resolution_level = 10;
39 while ((c = getopt(argc, argv,
"vhca:o:r:l:")) != -1) {
45 latDegrees = atof(optarg);
48 lonDegrees = atof(optarg);
51 radius_degrees = atof(optarg);
54 force_resolution_level = atoi(optarg);
75 STARE_SpatialIntervals circle_indices = stare.CoverCircleFromLatLonRadiusDegrees(latDegrees, lonDegrees,
77 force_resolution_level);
79 for (STARE_SpatialIntervals::iterator i = circle_indices.begin(), e = circle_indices.end()-1; i != e; ++i)
81 cout << *(circle_indices.end()-1) << endl;
84 for (STARE_ArrayIndexSpatialValue s: circle_indices) {