[R-sig-Geo] Transform decimal degrees units in km - ReadOGR & owin{spatstat}
Aurelie C.Godin
godina at dal.ca
Wed Apr 4 15:36:57 CEST 2012
Thanks for the hint Tom,
I did came across this post previously:
http://r-sig-geo.2731867.n2.nabble.com/readOGR-default-unit-td7337370.html
http://r-sig-geo.2731867.n2.nabble.com/readOGR-default-unit-td7337370.html
This is what I've done so far, but I don't understand why/if I need to do
so. Doesn't my div0A SpatialPolygonsDataFrame already has my CRS argument
defined? Why do I need to spTransform then?
proj4string(div0A) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84
+no_defs")
xxlcc <- spTransform(div0A, CRS("+init=epsg:4326"))
res1 <- lapply(slot(xxlcc, "polygons"), function(x)
sapply(slot(x, "Polygons"), slot, "area"))
> summary(unlist(res1))
Min. 1st Qu. Median Mean 3rd Qu. Max.
89.72 89.72 89.72 89.72 89.72 89.72
newW<-as(xxlcc, "owin")
> summary(newW)
Window: polygonal boundary
single connected closed polygon with 29 vertices
enclosing rectangle: [-80, -57.6343]x[66.25, 78.16666]units
Window area = 89.7204 square units
Correct? How can I specify/know my unit of length in km?
Moreover, this window is ~Baffin Bay, west of Greenland and I am wondering
if I should be using a different datum? E.g. EPSG Projection 4747 - GR96?
Although, I will have to create ppp object, for which the coordinates have
been taken with GPS satellite navigation system.
I would appreciate if someone can walk me through this or suggest an online
example or further readings. I read chapter 4: Spatial Data Import and
Export in Applied Spatial Data Analysis with R (2008), but I'm obviously
very new to all of this.
Thank you very much in advance,
Aurelie
-----
Aurelie Cosandey-Godin
Ph.D. Student, Department of Biology, Dalhousie University
Industrial Graduate Fellow, WWF-Canada
Email: godina at dal.ca | Web: wormlab.biology.dal.ca
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Transform-decimal-degrees-units-in-km-ReadOGR-owin-spatstat-tp7434090p7436500.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list