[R-sig-Geo] New sp add-on packages on sourceforge repository

Roger Bivand Roger.Bivand at nhh.no
Fri Oct 21 15:10:43 CEST 2005


I have released two new sp add-on packages on the r-spatial repository.

Rgshhs converts GSHHS shorelines (as closed polygons) to sp class
SpatialPolygons, which can then be written out as shapefiles for the
chosen region. It's now very slow for full resolution, because clipping
the largest land polygons takes a lot of time, but hopefully people don't
do that every time they need data. It is provided with the coarse dataset,
but works with the full and the others. It leaves the longitude 
coordinates in the -20 to 360 range like the data source. Details of the 
Global Self-consistent, Hierarchical, High-resolution Shoreline Database 
are avialable from:

http://www.soest.hawaii.edu/wessel/gshhs/gshhs.html

where the low, intermediate, high, and full resolution data may be 
downloaded from. I'd be grateful for ideas for making it faster, and am 
looking at providing indices of which level polygons are included in 
next-level polygons preprocessed in the package rather than computing them 
each time for chosen polygons.

A second package is spspatstat, providing interfaces between some sp 
classes and the well-supported point pattern analysis package spatstat. 
The spatstat ppp and owin classes are matched with sp equivalents.

To get a feel for where sp is going, (and after installing sp and 
spatstat from CRAN with their dependencies, and the new packages from 
http://r-spatial.sourceforge.net/R), try:

library(Rgshhs)
library(spspatstat)
gshhs.c.b <- system.file("share/gshhs_c.b", package = "Rgshhs")
NZx <- c(160, 180)
NZy <- c(-50, -30)
NZ <- Rgshhs(gshhs.c.b, xlim = NZx, ylim = NZy)
plot(runifpoint(500, as(NZ$SP, "owin")))

Hoping for feedback,

Roger

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list