[R-sig-Geo] extracting coordinates

Edzer Pebesma edzer.pebesma at uni-muenster.de
Mon Feb 28 18:04:40 CET 2011



On 02/28/2011 04:59 PM, Robin W Hunnewell wrote:
> Hi,
> 
> I'm going through some initial data inspection, and working through steps in the 
> "Applied Spatial Data analysis with R" book.
> Following steps in Ch. 2 of the "Applied Spatial Data analysis with R" book, I 
> was able toextract a set of coordinates from my
> SpatialPoints object just fine. The object returned looks right - the 
> coordinates are extracted correctly, but my bounding box does
> not change. The same min/max for coords.x1 and x2 get returned instead of a new 
> bounding box that reflects the selection.

I can't reproduce this:

> library(sp)
> data(meuse)
> coordinates(meuse)=~x+y
> bbox(meuse)
     min    max
x 178605 181390
y 329714 333611
> bbox(meuse[1,])
     min    max
x 181072 181072
y 333611 333611

> 
> Not sure what I'm missing, would appreciate any help - I apologize if this is 
> overly simple!

It helps if you send us the commands that lets one can reproduce what
you did, preferably with data that are available to everyone. This helps
us to understand your question.

> thanks,
> Robin
> 
> 
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list