Description Usage Arguments Details Value Author(s) See Also Examples
Convert two polylines into a polygon.
1 | convLP (polyA, polyB, reverse = TRUE)
|
polyA |
PolySet containing a polyline. |
polyB |
PolySet containing a polyline. |
reverse |
Boolean value; if |
The resulting PolySet contains all the vertices from
polyA
in their original order. If reverse = TRUE
, this
function appends the vertices from polyB
in the reverse order
(nrow(polyB):1
). Otherwise, it appends them in their original
order. The PID
column equals the PID
of polyA
.
No SID
column appears in the result. The resulting polygon is
an exterior boundary.
PolySet with a single PID
that is the same as
polyA
. The result contains all the vertices in polyA
and
polyB
. It has the same projection
and zone
attributes as those in the input PolySets. If an input PolySet's
attributes equal NULL
, the function uses the other
PolySet's. If the PolySet attributes conflict, the result's attribute
equals NULL
.
Nicholas M. Boers, Associate Professor – Computer Science
MacEwan University, Edmonton AB
Last modified Rd: 2013-04-10
addLines
,
appendPolys
,
closePolys
,
convCP
,
joinPolys
,
plotLines
.
1 2 3 4 5 6 7 8 9 10 11 | local(envir=.PBSmapEnv,expr={
oldpar = par(no.readonly=TRUE)
#--- create two polylines
polyline1 <- data.frame(PID=rep(1,2),POS=1:2,X=c(1,4),Y=c(1,4))
polyline2 <- data.frame(PID=rep(1,2),POS=1:2,X=c(2,5),Y=c(1,4))
#--- create two plots to demonstrate the effect of `reverse'
par(mfrow=c(2, 1))
plotPolys(convLP(polyline1, polyline2, reverse=TRUE), col=2)
plotPolys(convLP(polyline1, polyline2, reverse=FALSE), col=3)
par(oldpar)
})
|
sh: 1: cannot create /dev/null: Permission denied
-----------------------------------------------------------
PBS Mapping 2.70.4 -- Copyright (C) 2003-2017 Fisheries and Oceans Canada
PBS Mapping comes with ABSOLUTELY NO WARRANTY;
for details see the file COPYING.
This is free software, and you are welcome to redistribute
it under certain conditions, as outlined in the above file.
A complete user guide 'PBSmapping-UG.pdf' is located at
/usr/lib/R/site-library/PBSmapping/doc/PBSmapping-UG.pdf
Packaged on 2017-06-28
Pacific Biological Station, Nanaimo
All available PBS packages can be found at
https://github.com/pbs-software
To see demos, type '.PBSfigs()'.
-----------------------------------------------------------
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.