52 fprintf (
stderr,
"\rxyz2kdt: %3.0f%% complete %02d:%02d:%02d remaining",
89 "Usage: xyz2kdt [OPTION] BASENAME\n"
91 "Converts the x, y and z coordinates on standard input to a\n"
92 "2D-tree-indexed database suitable for use with the\n"
93 "terrain module of Gerris.\n"
95 " -p N --pagesize=N sets the pagesize in bytes (default is 4096)\n"
96 " -v --verbose display progress bar\n"
97 " -h --help display this help and exit\n"
99 "Report bugs to %s\n",
100 "popinet@users.sf.net");
104 fprintf (
stderr,
"Try `xyz2kdt -h' for more information.\n");
111 "xyz2kdt: missing BASENAME\n"
112 "Try `xyz2kdt -h' for more information.\n");
122 while (
scanf (
"%lf %lf %lf", &
p.x, &
p.y, &
p.z) == 3) {
149 "\r%ld points Height min: %g average: %g max: %g\n",
void kdt_sum_init(KdtSum *s)
long kdt_query_sum(const Kdt *kdt, KdtCheck includes, KdtCheck intersects, void *data, const KdtRect query, KdtSum *sum)
void kdt_destroy(Kdt *kdt)
void kdt_heap_create(KdtHeap *h, FILE *fp, long start, long len, long buflen)
int kdt_create(Kdt *kdt, const char *name, int blksize, KdtHeap *h, void(*progress)(float complete, void *data), void *data)
void kdt_heap_flush(KdtHeap *h)
int kdt_open(Kdt *kdt, const char *name)
void kdt_heap_put(KdtHeap *h, KdtPoint *p)
int(* KdtCheck)(const KdtRect rect, void *data)
int main(int argc, char *argv[])
static int includes_true(KdtRect rect)