[R-sig-Geo] convert spatstat owin-object to splancs
Marco Helbich
marco.helbich at gmx.at
Tue Apr 7 12:11:03 CEST 2009
Dear list,
I have the following problem: my dataset contains some events (points) and a
studyarea, I used some spatstat functions and now I want to use the
bandwidth estimation mse2d() in the splancs package. My problem is to
convert the spatstat owin-object (studyarea) to use it in the splancs
package. This is the structure of my studyarea:
str(studyarea)
Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots
..@ data :'data.frame': 1 obs. of 4 variables:
.. ..$ Id : int 0
.. ..$ Area_sqmi: num 513
.. ..$ Areasqmi : num 513
.. ..$ Areakm2 : num 1329
..@ polygons :List of 1
.. ..$ :Formal class 'Polygons' [package "sp"] with 5 slots
.. .. .. ..@ Polygons :List of 1
.. .. .. .. ..$ :Formal class 'Polygon' [package "sp"] with 5 slots
.. .. .. .. .. .. ..@ labpt : num [1:2] 1446129 850484
.. .. .. .. .. .. ..@ area : num 1.33e+09
.. .. .. .. .. .. ..@ hole : logi FALSE
.. .. .. .. .. .. ..@ ringDir: int 1
.. .. .. .. .. .. ..@ coords : num [1:3530, 1:2] 1458298 1458329 1458357
1458411 1458494 ...
.. .. .. ..@ plotOrder: int 1
.. .. .. ..@ labpt : num [1:2] 1446129 850484
.. .. .. ..@ ID : chr "0"
.. .. .. ..@ area : num 1.33e+09
..@ plotOrder : int 1
..@ bbox : num [1:2, 1:2] 1420242 828662 1476943 872228
.. ..- attr(*, "dimnames")=List of 2
.. .. ..$ : chr [1:2] "r1" "r2"
.. .. ..$ : chr [1:2] "min" "max"
..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots
.. .. ..@ projargs: chr " +proj=lcc +lat_1=34.91666666666666
+lat_2=27.41666666666667 +lat_0=31.16666666666667 +lon_0=-100 +x_0=1000000
+y_0=1000000 +el"| __truncated__
>
Thank you for your help!
Marco
More information about the R-sig-Geo
mailing list