[GRASS5] libgis raster reading

Andrea Antonello moovida at katamail.com
Wed Mar 31 01:02:18 EST 2004


Lost's of thanks for your reply, this will help me one step forward.

Well, then let's get lost... :)
Andrea



On Tuesday 30 March 2004 22:17, Glynn Clements wrote:
> Andrea Antonello wrote:
> > I need to understand how GRASS reads and writes the raster data from
> > disk. The developer Manual doesn't go much into detail and I'm having big
> > problems to get lost inside the code...
>
> No surprise there. I probably understand that code as well as any of
> the current developers, and I also get lost inside the code.
>
> FWIW, the relevant files are opencell.c, get_row.c, put_row.c and
> closecell.c, all in src/libes/gis.
>
> > Any hint on used algorithms (LZW?)
>
> LZW was used at one point, but isn't supported in 5.x. Integer maps
> are stored in big-endian order using a sign bit (*not* twos
> complement), with optional run-length compression; floating-point maps
> are encoded using XDR and optional zlib (gzip) compression.
>
> The core functions for writing are put_data/put_fp_data. For reading,
> there aren't really any core functions; the process seems to be evenly
> distributed across most of get_row.c.
>
> > or documentation parts I missed are appreciated.
>
> AFAIK, the only viable source of information on the raster map formats
> is the source code.
>
> > PS: is there some project ongoing that aims to rewrite the raster I/O
> > libs in any programming language?
>
> I'll probably do it one day, unless someone else gets there first.

-- 
____________________________________________________________________________

University of Trento
Department of Civil and Environmental Engineering
Via Mesiano, 77 - Trento (ITALY)

Andrea Antonello
tel:  +393288497722
fax:  +390461882672
____________________________________________________________________________





More information about the grass-dev mailing list