Skip to content
Prev 38 / 29559 Next

A package for spatial data classes: request for comments

Barry Rowlingson wrote:

            
Baz, I agree that interfaces are important. Still, concentrating on 
interfaces _only_
does encourage package writers to come up each with a new set of spatial 
classes
-- something I would like to discourage: sharing more code makes the 
code more
reliable.

I did build upon your idea of sp.coords, but called it coordinates, and 
used reference (column name/numbers) instead of actual values:

coordinates(meuse) = c("x", "y")

I prefer coordinates because at some stage the S3 method mechanism may
interpret sp.coords as an sp method for a coords class.

My question, in your perspective, would be: which methods do we need for
a generic class containing vector/polygon data?

E.g. how is,

polygons(world) # gets or sets the polygons, as a list of 2 col matrices
polygonAttributes(world) # gets or sets the polygon attributes, as data 
frame
--
Edzer