Skip to content
Prev 3293 / 29559 Next

gdal error 1 (execution halted)

Dear Simon,
On Mon, 17 Mar 2008, sj wrote:

            
Scripted R fails by design on error. Interactive R also fails, but hands 
control back to the prompt, instead of terminating R, because the 
interactive user is expected to sort the error out.

The reason the output seemed to be OK is that the default "Unknown" type 
happened to make a 4-band RGBA file - by the way, we don't know whether 
this was at the stage of creating the GDAL dataset, or saving it, because 
the file gets written twice, once to a temporary location, next to its 
destination.
No, findInterval() is an excellent and very fast function for this 
purpose. Only vec= needs to be sorted, but that is the same in cut() and 
not an unreasonable requirement.
When debugging, it is never a good idea to overwrite. Further, R uses 
advanced memory management and a garbage collector, so you are not 
guaranteed immediate reductions in memory usage by overwriting - it will 
depend on when garbage collection happens.
A string value not in rgdal:::.GDALDataTypes results in the type being set 
to "Unknown", which then has different behaviour fro different drivers. In 
the next rgdal release, users of writeGDAL will be forced to give a valid 
type (but not users of the underlying GDAL functions.

Roger