A package for spatial data classes: request for comments
As I mentioned to Roger Bivand a few days ago, it might be a good idea to take a look at the spatial classes in ESRI's ArcGIS. In my view they are not 100% ready for statistical analysis, but the vector classes are very well structured. What is missing is an efficient way to incorporate "topology" (contiguity structure) to provide an easy way to construct spatial weights. In GeoDa, we build this from scratch, using the shape files, but that's not the way it should be (although very fast). L.
On Monday, November 3, 2003, at 09:08 AM, Edzer J. Pebesma wrote:
Barry Rowlingson wrote:
To be really useful, the class should include vector (polygon) data, and probably line elements. For this, I need help. The simples approach would be to extend SpatialDataFrame to SpatialDataFramePolygon, and add for each row add the corresponding polygon.
I think you need to stop thinking about building classes at the moment, and to think about specifying _interfaces_. What methods do we want for spatial data? How will functions get the spatial data out of the objects? Then we can build classes that implement these interfaces.
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
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-geo
---------------------------------------------------------------- Luc Anselin, PhD. Faculty Excellence Professor and Director Spatial Analysis Laboratory Dept. Agricultural and Consumer Economics University of Illinois at Urbana-Champaign http://sal.agecon.uiuc.edu/