[R] PBSmapping problems with importGSHHS

Tim Clark mudiver1200 at yahoo.com
Thu May 28 06:38:00 CEST 2009


Dear List,

I am trying to use the PBSmapping package to import and plot the shoreline of Hawaii.  I am having problems importing and plotting the specific regions that I would like to plot.  Specifically, I can't get it to import the range of x variables that I would like.  I think my problem is with a variable called xoff, but I have no idea what it is, what it does, or how I am supposed to use it.  It's default value is -360, but I have found examples in the PBSmapping web publication of it being set to zero as well.  The help files provides the following definitions:

xlim range of X-coordinates to clip. Range should match the transform xoff. 

xoff transform the X-coordinates by specified amount. 


I can import certain regions of GSHH, but I don't seem to be able to limit them like I want using xlim.  If I change xoff to something besides -360 I get different sizes of plots that are all the color I am using for land.  I have the following:

Hawaii.GSHH<- importGSHHS(GSHHfile,
xlim=c(-156.3,-155.92), ylim=c(19.45,19.5), xoff=-360)

The GSHHS shoreline data is found at:
http://www.soest.hawaii.edu/wessel/gshhs/gshhs.html

Any suggestions on what is going on?

Thanks,

Tim




Tim Clark
Department of Zoology 
University of Hawaii




More information about the R-help mailing list