[GRASS-dev] Re: [GRASS GIS] #788: r.out.gdal and nodata
GRASS GIS
trac at osgeo.org
Tue Dec 22 21:18:24 EST 2009
#788: r.out.gdal and nodata
----------------------+-----------------------------------------------------
Reporter: frankie | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Raster | Version: 6.4.0 RCs
Resolution: | Keywords: r.out.gdal, nodata
Platform: Linux | Cpu: Unspecified
----------------------+-----------------------------------------------------
Comment (by hamish):
Ok sounds good. Lets go ahead and backport what's in the gr7 version to
gr6.5. No point in widely testing dead-end code in 6.5...
Replying to [comment:5 mmetz]:
> The checks during the actual export could be moved to a
> separate pass over all raster bands to be exported, I think
> this is the safest solution, then r.out.gdal does not have to
> bother with cleaning up and can leave all format-specific error
> handling to GDAL.
sounds ok to me/I could live with that. anyone else have a POV?
> What is missing is a region check. At the very least, r.out.gdal
> should make sure that at least some parts of the raster maps to
> be exported fall within the current region, if not, abort with
> error: raster map outside current region, nothing to export.
hmmm. I would not do that, it is straying away from checking for errors
into checking for intention. I would say that's a good idea but change it
to a G_warning() or G_message() instead of G_fatal_error() and just write
a map full of NULLs regardless. No other GRASS raster module refuses to go
on if you have the region (ie '''WIND'''ow) set beyond its bounds.
e.g. I have a script which tiles a raster into a series of small geotiffs.
say I had a region with a full raster map in the top left and another in
the bottom right with overlapping the corners in the middle and empty
space in the opposite corners. I'd want those all-NULL tiles instead of a
404 error.
{{{
|-----------------|
| |
| +-----+ |
| | | |
| | +-+-----+ |
| +---|-+ | |
| | | |
| +-------+ |
|-----------------|
}}}
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/788#comment:6>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list