Reading in images
MINOJA at icil64.cilea.it
MINOJA at icil64.cilea.it
Fri Dec 18 05:15:44 EST 1992
>> We have several images are in different foramt (TGA, LAN, and TIFF). What is
>> the best way of reading them into grass. Will r.in.rast read these files
>> properly or does it have to be in another format. The images are not
>> rectified, so will there be a problem reading them in.
--------------------------------------------------------------------------------
I have written how to export a raster file from grass4.0.
Now to import a file into grass database is necessary to convert it into a
raster file.
So You may use pbmplus routines to do it, for example :
/pbmplus/ppm/tgatoppm file.tga | /pbmplus/pnm/pnmtorast -standard > file.ras
or
/pbmplus/pnm/tifftopnm file.tiff | /pbmplus/pnm/pnmtorast -standard > file.ras
Is possibile to insert into grass this file created using from grass4.0 the
command : r.in.sunrast input=/mydir/file.ras output=newname.
Now You can see Your file using g.list with raster option.
To transform this one from raster into vector is necessary use grass command
r.thin (sometimes) and r.line (always).
If You don't have pbmplus, otherwise You may use ImageMagick filters (I have
tested the compatibility); unfortunately I don't know LAN format.
Bruno
-----------------------------------------------------------------------------
Bruno Minoja
Cilea (Consorzio Interuniversitario Lobardo Elaborazione Automatica)
Via R. Sanzio 4 Segrate Milano
Italia
e_mail : minoja at icil64.cilea.it (131.175.1.5)
-----------------------------------------------------------------------------
More information about the grass-user
mailing list