Does anybody know of an issue with either DSpat's
create.lines or spatstat's
rlinegrid? Whenever I use these functions on my Windows (owins), the output has far too many lines.
For example, if I run
DSpat::create.lines(owint, nlines=80, width = 1, spacing=NULL,angle=0)
The output has approx. 2000 lines.
If I do a bit of math so I can set the number of lines output from
rlinegrid, based on window diameter:
dot <- diameter.owin(owin) d8 <- (dot / 80) rlgt <- rlinegrid(angle = 0, spacing = d8, as.owin(owint))
The output also has approx. 2000 lines.
Simplifying the owin by converting to
sp and using
gSimplify, then running through the above functions works for the most part, but sometimes the functions still output too many lines.
The shape I am adding lines to is similar to this:
Am I misunderstanding how
Note: The code to import the image and run through all the code previous to this issue is very long and arduous, but I can upload it if an example is needed.