[Rspatial-devel] sp_0.9-94.tar.gz

Edzer Pebesma edzer.pebesma at uni-muenster.de
Thu Feb 2 16:30:57 CET 2012


Dear Sarah,

as announced yesterday, here:
https://stat.ethz.ch/pipermail/r-sig-geo/2012-February/014095.html

the classes SpatialGrid and SpatialGridDataFrame in sp have changed.

this broke the landsat package in CRAN checks; see below. This only
showed up now because sp has no direct dependency of landsat. If the
landsat package would have included sp in Depends: than I would have
picked this up before submitting to CRAN.

The @coords slot you wanted has disappeared. You can get this
information from the bounding box, but that gives the box around the
grid (grid corners), instead of the grid cell centres of two corner
cells, but you can figure out how to get it. With sp 0.9-93, which had
the @coords in SptaialGrid* objects:

> library(sp)
> loadMeuse()
> fullgrid(meuse.grid)=T
> bbox(meuse.grid)
     min    max
x 178440 181560
y 329600 333760
> meuse.grid at coords
          x      y
[1,] 178460 329620
[2,] 181540 333740
> gridparameters(meuse.grid)
  cellcentre.offset cellsize cells.dim
x            178460       40        78
y            329620       40       104


The following may help:

> t(bbox(meuse.grid)) - c(-.5,.5) %o% gridparameters(meuse.grid)$cellsize
         x      y
min 178460 329620
max 181540 333740
> meuse.grid at coords
          x      y
[1,] 178460 329620
[2,] 181540 333740

Best regards,
--
Edzer


On 02/02/2012 03:58 PM, Prof Brian Ripley wrote:
> On 01/02/2012 07:59, Prof Brian Ripley wrote:
>> On 01/02/2012 07:51, Edzer Pebesma wrote:
>>> The new sp_ version on /incoming hopefully has fixed this issue.
>>
>> Seems to have, thanks: updated on CRAN. A complete re-test will appear
>> in 24 hours.
> 
> And now I've had a chance to look at those runs, there seems a new
> problem with the indirect dependency landsat:
> 
>> ### Name: georef
>> ### Title: Simple image-matching georeferencing function.
>> ### Aliases: georef
>> ### Keywords: spatial utilities
>>
>> ### ** Examples
>>
>> # to use for georeferencing
>> data(nov3)
>> data(july3)
>> july.shift <- georef(nov3, july3, maxdist=50) # match july to november
>> july3.corr <- geoshift(july3, padx=50, pady=50, july.shift$shiftx,
> july.shift$shifty)
> Error in checkSlotAssignment(object, name, value) :
>   "coords" is not a slot in class “SpatialGridDataFrame”
> Calls: geoshift -> @<- -> slot<- -> checkSlotAssignment
> 
> Brian
> 
> 
>> Brian
>>
>>> Best wishes,& thanks,
>>>
>>> On 02/01/2012 08:08 AM, Prof Brian Ripley wrote:
>>>> On 31/01/2012 19:57, Edzer Pebesma wrote:
>>>>> CRAN masters,
>>>>>
>>>>> I uploaded sp_0.9-94.tar.gz to /incoming on CRAN.
>>>>>
>>>>> I checked it succesfully against 78 out of the 86 packages that depend
>>>>> on sp (thanks to Uwe's help with the script); the others 6 I couldn't
>>>>> check because of other complex dependencies, too complex for me.
>>>>>
>>>>> The major change is that to class SpatialGrid, which no longer is() a
>>>>> SpatialPixels, but needs explicit coercion to become so.
>>>>>
>>>>> Best regards,
>>>>
>>>> Did you try pgirmess? It looks to me as if it has been affected:
>>>>
>>>>> ### Name: rwhatpoly
>>>> ...
>>>>> # extraction
>>>>> rwhatpoly(meuse.grid,SP,att=4) # get the number of pixels of each soil
>>>> category (column) in each polygon (rows)
>>>> Error in table(polyID, sgdf at data[, att], useNA = "ifany") :
>>>> all arguments must have the same length
>>>>
>>>> Everything else looks fine: the output from some of your examples will
>>>> change in 2.15.0 (the number of NAs is reported by summary() as an
>>>> integer).
>>>>
>>>> Brian
>>>>
>>>
>>
>>
> 
> 

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics      e.pebesma at wwu.de


More information about the Rspatial-devel mailing list