[GRASS-dev] [GRASS GIS] #1685: r.in.ascii -s for SURFER does not work in grass7
GRASS GIS
trac at osgeo.org
Thu Jul 5 09:45:28 PDT 2012
#1685: r.in.ascii -s for SURFER does not work in grass7
-----------------------------------------------+----------------------------
Reporter: helena | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone: 7.0.0
Component: Raster | Version: svn-trunk
Keywords: raster import, Surfer, r.in.ascii | Platform: All
Cpu: OSX/Intel |
-----------------------------------------------+----------------------------
Comment(by mmetz):
Replying to [comment:1 hamish]:
> the error message in g7 lib/gis/seek.c is now just "Unable to seek";
it's not a fundamental limitation just a regular bug AFAICT.
>
In GRASS 6.x, r.in.ascii would have the same bug if it would check the
return value of fseek() (it might be a good idea to check the return value
of fread() as well). The attached fix is simply to not fseek after the
last row has been read from the input file, that must fail if direction <
0. For sz == 0, fseek from SEEK_CUR has no effect anyway.
Markus M
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1685#comment:2>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list