[R-sig-Geo] [R] Plot/manage spatial boundary data

David Forrest drf5n at maplepark.com
Fri Jun 10 22:54:24 CEST 2005


On Fri, 10 Jun 2005, Roger Bivand wrote:
...
> > The segments are largely connected -- my domain is bounded by a list of
> > open boundary segments, land boundary segments, and several islands.
> > library(sp) looks like the proper tool.
>
> If you can identify the open segments, and make Sline objects of them,
> you'll get the bounding box too (bbox() of the output object). That gives
> you the coordinates you need to close them against the study area boundary
> (assumed rectangular in latlong), by rbind() to the input coordinates for
> the missing bits, and copy in coords[1,] at the end to close. Since the
> islands are closed rings anyway, I think this should work. Please let us
> know how you get on.
>
> Roger

Thanks,
  I'm poking around my data to see what is my boundary lists

http://www.maplepark.com/~drf5n/cgi-bin/wiki.cgi?ElcircVisualization has
an old sample dataset (in UTM zone 18?) (and the boundary information is
missing in that old sample file).

On a more current output file, (with a proprietary FEM grid) it looks like
only one of the 27 boundaries are closed, and that may be accidental.
Boundary segment 0 is the ocean open-boundary condition, and when appended
to boundary segment 27, the Chesapeake Bay coastline, it forms a closed
loop around my model domain.

http://www.maplepark.com/~drf5n/cgi-bin/wiki.cgi?ElcircVisualization

has a few of my boundary extractor functions.

At this point, I have a closed boundary surrounding my domain, and 3 time
series of spatial fields defined at node points that I can index into my
geom[] dataframe.

I'm really not experienced in GIS, but a product I would like to make
from this data is a plot of the water height or surface current vectors
at a set of times.  As the plot on the page referenced above shows, I'm
not sure what to do next.

I'd like to mask off the coastline, plot either a selection of my node
points or interpolate onto a regular grid within the polygon, not
interpolate across the dirt, and use R to visualize the results of my
model.

I saw http://r-spatial.sourceforge.net/gallery/ , and the code there looks
like it could help.  I'll dig into that.

Meanwhile, which text should I buy and read?

Thanks for your time,
Dave
-- 
 Dr. David Forrest
 drf at vims.edu                                    (804)684-7900w
 drf5n at maplepark.com                             (804)642-0662h
                                   http://maplepark.com/~drf5n/




More information about the R-sig-Geo mailing list