[R-sig-Geo] dataframe access from SpatialLinesDataFrame and psp line segment identification
Julius Tesoro
jutesoro at yahoo.com
Wed Sep 30 14:12:19 CEST 2009
Hello again guys!
I wanted to extract an attribute on the data.frame from the SpatialLinesDataFrame nearest to the given points. I have a point pattern ("ppp") converted from a SpatialPointsDataFrame and I also have a line segment pattern("psp") converted from a SpatialLinesDataFrame. I used project2segment() to identify the distance from each point to the nearest line.
I got the following results:
project2segment(rs2,faults.psp)
$Xproj
marked planar point pattern: 15 points
marks are numeric, of type 'integer'
window: rectangle = [2041800, 2055500] x [5483700, 5497500] units
$mapXY
[1] 454 454 452 454 454 454 452 452 452 452 452 452 452 452 452
$d
[1] 33968.58 34510.82 34858.51 30815.14 38627.78 40485.38 40898.08 41335.99
[9] 36471.86 32670.05 42284.76 42614.63 43422.89 30598.01 41518.95
$tp
[1] 0.0000000 0.0000000 0.5489390 0.0000000 0.0000000 0.0000000 0.6827169
[8] 0.6040709 0.4998253 0.5010383 0.6046778 0.6081116 0.6547277 0.4724737
[15] 0.5071538
How are these segments identified in a map? Are these numbers in $mapXY found from the original "SpatialLinesDataFrame" from which it was converted?
Thanks.
More information about the R-sig-Geo
mailing list