On 8-Sep-06, at 14:23, Roger Bivand wrote:

> On Fri, 8 Sep 2006, Scott W Mitchell wrote:
>
>>
>> It gets through translating the data set and the image command, but
>> then on summary() I get:
>
> Can you re-run the example code by hand, line by line (copy & paste  
> for
> example)? From what you write, image displays correctly, is that  
> right?
> That suggests that the data has been read correctly, otherwise it  
> would
> not have displayed? Which image is this - several are read in the  
> example?

Yes, sorry, it does display the image, and then chokes on the summary 
(x) - this is in the FIRST part of the example - identical behaviour  
when run manually.

>
> Does example(GDAL.open) run smoothly?

No.

OK, before I got any further through your suggestions, I thought I  
should try eliminating the version of gcc used as a potential cause,  
as mentioned in my followup message to the original post.

I have just downloaded the R binary for OS 10.4.4+, which also comes  
with a version of gcc with the bug fixed, and then I reinstalled  
rgdal, sp, and VR from source, and sure enough, now I get through the  
examples fine.  So, it's solved.  At least now the warning against  
using recent Apple-supplied gcc for this will now be documented in  
this list, as it was in R-sig-mac.

The good news is that I don't imagine this will apply at all to  
Jonathan, running OS 10.3.9 and (I presume) older development tools  
(i.e. https://stat.ethz.ch/pipermail/r-sig-geo/2006-September/ 
001263.html ), since I'm almost certain that this bug in the Apple- 
supplied gcc did not exist prior to XCode-2.2.x.

That would make sense with my "alignment issue", since this version  
of the dev tools added support for universal binaries to handle the  
new architecture to the general public.  Hopefully they'll fix it  
soon.  In the meantime, the gcc supplied by the Mac team at CRAN does  
the trick.

Cheers,
Scott

> Something in the first band of the
> data is causing sort to choke, could it be an NA? can you copy out the
> band to a regular vector, and save it to file as an R object? If it  
> is a
> value in the band, it should be saved in a platform independent  
> way. GDAL
> also swaps to suit endianness.
>
> Roger
>
>>
>> rdGDAL> summary(x)
>>
>> *** caught bus error ***
>> address 0x17, cause 'invalid alignment'
>>
>> Traceback:
>> 1: sort(x, partial = unique(c(lo, hi)))
>> 2: quantile.default(object)
>> 3: stats::quantile(object)
>> 4: summary.default(X[[1]], ...)
>> 5: FUN(X[[1]], ...)
>> 6: lapply(as.list(object), summary, maxsum = maxsum, digits =
>> 12,     ...)
>> 7: summary.data.frame([EMAIL PROTECTED])
>> 8: summary([EMAIL PROTECTED])
>> 9: summary([EMAIL PROTECTED])
>> 10: summary(x)
>> 11: summary(x)
>> 12: eval.with.vis(expr, envir, enclos)
>> 13: eval.with.vis(ei, envir)
>> 14: source(zfile, local, echo = echo, prompt.echo = prompt.echo,
>> verbose = verbose, max.deparse.length = 250, encoding = encoding)
>> 15: example(readGDAL)
>>
>> Possible actions:
>> 1: abort (with core dump)
>> 2: normal R exit
>> 3: exit R without saving workspace
>> 4: exit R saving workspace
>> Selection:
>>
>> A byte-ordering issue???
>>
>> Any suggestions?
>>
>> Scott
>>

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to