Description Usage References Examples
View source: R/lineSegmentsCRSConversion.R
Line segments conversion from a angles-length-centers to endpoints coordinates
1 |
equation 1.78, page 56 of D:/IMP/Transferencia/ReporteMetodologiasDFN_FmendozaT.pdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ae <- circular(c(0, 45, 90, 135),units="degrees",
template="geographics")
le <- c(2, sqrt(2) * 3, 3, sqrt(2) * 3)
ends <- data.frame(x0 = c(0, 1, 1, -1),
y0 = c(1, 1, 0, 1),
x1 = c(0, 4, 4, -4),
y1 = c(3, 4, 0, 4)
)
xe <- data.frame(a = ae, l = le,
x = (ends$x0 + ends$x1) / 2,
y = (ends$y0 + ends$y1) / 2)
plotSegments(
segment=list( g1 = list(x0 = ends$x0, y0 = ends$y0,
x1 = ends$x1, y1 = ends$y1)),
asp=1, main="Segments")
points.default(xe$x, xe$y, pch=20) # adding the midpoints to the current plot
print(ends)
lineSegmentsCRSConversion(x = xe)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.