Comments (3)
I was puzzled by the fact that more than one hole wasn't properly triangulated at some point as well. Then I noticed that transposing H
fixed the issue for me. If I continue to work with such a transposed H
, I now get an error (albeit fortunately a rather helpful one). So even though the previous solution maybe shouldn't have worked, this is actually a bit of a breaking change...
The issue even goes a bit further: The case of no holes now needs to be special cased. I'm generating my list of holes through rgeos::gPointOnSurface(...)@coords
inside sapply
. To address the aforementioned issue, I now need to transpose the result. But if sapply
is applied to an empty list, I'll get an empty list in return (previously an acceptable H
), which is unchanged by t()
, yet the pslg()
constructor will always make sure the number of columns is equal to 2 now while the empty list has no columns.
Maybe it would be a good idea to carry out the number-of-columns check only after H
is found to contain anything at all so that I don't need to pass a matrix(ncol=2,nrow=0)
? I thought I'd at least suggest it...
from rtriangle.
Oh dear, I'd not realised this would break some things. However, the fix does now mean that pslg() is doing what it's documented to do. I'm a little anxious about adding sanitisation of empty lists, as I then feel I might need to document it. Also, perhaps then it would make sense to supply options for giving lists of hole coordinates... However, I'd be open to suggestions for patches.
from rtriangle.
Fwiw I post-process holes by testing if any triangle centroid falls in a hole, it's pretty efficient. This is in r-gris/trimesh in the tri_mesh function. It's not ready for general use yet but getting close.
from rtriangle.
Related Issues (15)
- is.na(PB) throws warning when valid PB supplied HOT 2
- RTriangle runs out of memory HOT 1
- Add Neighbour (NB) to output HOT 1
- plotting the voronoi tessellation
- A bug/error when "MaxArea" is small. HOT 7
- triangulating a pslg with attributes HOT 4
- Function declaration without prototype is deprecated HOT 1
- Compiled code should not call sprintf
- -Wformat-extra-args warnings
- -Wformat= warnings
- Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols
- Crash under Windows i386 with particular PSLG
- Array overruns HOT 1
- potential anyDuplicated speed-up for pslg HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtriangle.