[GRASS-dev] r.out.gdal rewritten - won't scale beyond 2GB

Andrew Danner adanner at cs.swarthmore.edu
Tue Oct 24 11:17:04 EDT 2006


I'm all for replacing the r.out.gdal script, but one problem I have with
the new C version of r.out.gdal is that it creates a temporary raster
entirely in memory and won't work with rasters larger than 2GB, of which
I have many. It would be nice if the temp raster format that is
currently the "MEM" supported the following

1) GDALCreate 
2a) GDALSetRasterNoDataValue,
2b) remapping of NULL values,
3) Grass datatypes Float32, Float64, and Int32
4) Multiple Bands
5) GDALSetGeoTransform, GDALSetProjection
6) GDALSetRasterColorInterpretation ?? 
   (used in new r.out.gdal, but required?)
7) Files larger than 2GB

The final output format created using GDALCreateCopy may not support all
of these features depending on the target format, but we shouldn't lose
anything that is supported in GRASS when creating the temp copy,
including large files. 

In the past, I have used the "EHdr" driver to support 1,2b,3, and 7.
Then I could save the Transform and Projection information elsewhere. I
seem to recall GDAL didn't fully support 5 for "EHdr" in the sense that
it wouldn't write a .prj or .wld file for newly created "EHdr" files. 

The "MEM" file format has all of the requirements except #7, but it
isn't just a matter of fixing the "MEM" driver. Is there a file format
that is basically a file dump of "MEM"? 

-Andy

On Tue, 2006-10-24 at 09:39 +0200, Martin Landa wrote:
> Hi Vytautas,
> 
> it is great, thanks a lot for this!! There is small patch (not
> important changes). I think it should be added to CVS as r.out.gdal2
> (e.g.) for faster improvements (and testing).
> 
> Best regards, Martin
> 
> 2006/10/24, Vytautas <olivership at gmail.com>:
> > Hello, everybody :)
> >
> > I have just rewritten r.out.gdal in C language, made it based on GDAL
> > library. I think it should replace current r.out.gdal script based on
> > gdal_translate executable.
> >
> > It should help to avoid cyclic GRASS and GDAL dependence.
> >
> > Not fully implemented, but it works. Please test it and/or add
> > aditional features.
> >
> > Regards,
> > Vytautas
> >
> >
> > _______________________________________________
> > grass-dev mailing list
> > grass-dev at grass.itc.it
> > http://grass.itc.it/mailman/listinfo/grass-dev
> >
> >
> >
> 
> 
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev




More information about the grass-dev mailing list