/* given stdin of xyz, write out those records within the window Hardwired limits. Prepend a one to the output record in case you want it for ARC/INFO */ #include float x,y,z,xmin=120,ymin = 21.8,xmax=122,ymax=25.4; main () { y = 0; /* fprintf(stderr," Filtering stinn to stout\n"); fprintf(stderr,"%f %f %f %f\n",xmin,ymin,xmax,ymax); */ while ((scanf("%f %f %f",&y,&x,&z)) != EOF) { if((x >= xmin) && (x <= xmax) && (y >= ymin) && (y <= ymax)){ printf("1 %.6f %.6f %.6f\n",x,y,z); } } return 0; }