can't open file in v.in.arc
Timothy Keitt
tkeitt at algodones.unm.edu
Tue May 11 15:36:57 EDT 1993
Hi,
I'm having a problem reading in ARC/INFO data using v.in.arc (grass
4.0). When I enter a name for a "line file" to be imported I get a
message saying the file cannot be opened. I checked the source and
it appears that fopen is returning NULL instead of a valid file
pointer. I tried this on the test data supplied with the 4.0
release and with the data I am trying to import. Has anyone else
encountered this problem? Any help would be greatly appreciated.
Thanks,
Tim
Here's a segment of the code in v.in.arc:
/* LINES FILENAME */
done = 0;
do {
printf("\n LINES FILENAME\n");
printf("Enter the name of the file created with the LINES\n");
printf("option of the ARC/INFO Ungenerate command\n");
printf("Hit RETURN to cancel request\n");
printf("> ");
gets(tmpbuf);
if (strcmp(tmpbuf,"") == 0)
exit(0);
else
{
if (G__file_name(lines_filename,"arc",tmpbuf,G_mapset()) == NULL)
G_warning ("Could not find ARC line file %s\n", lines_filename);
-> if ((lines_file=fopen(lines_filename,"r")) == NULL)
-> G_warning("File could NOT be opened for reading ");
else
done = 1;
}
} while (!done);
--
===========================================================
| Timothy H. Keitt |
| The University of New Mexico |
| Department of Biology |
| Albuquerque NM 87131 |
| 505/277-3431 |
| tkeitt at algodones.unm.edu |
===========================================================
More information about the grass-user
mailing list