Now instead of mixing bools/numeric returns, we always use
ints, where:
-1 = left
0 = test failed, e.g. point on line
1 = right
Also fix a bunch of extra issues identified with left of tests
as a result of these changes
As the readme of poly2tri library says: "Poly2Tri does not support repeat points within epsilon."
When the coordinates are very near to each other, we get crashes in triangulation code.
To prevent that, we try to simplify geometries to hopefully fix the problem automatically,
if that fails we just skip the polygon as the last resort.
Usually this happens if user tries to use 3D renderer on unprojected lat/lon coordinates.
This can be used to force loading a layer into the current project.
The primary use case here is to load a preset layer as part of a
model, but it's also useful for loading results from the
'package layers' algorithm into the project.
This is required for algorithms with behaviour which depends on the
layer names (e.g. the package algorithm uses the layer name as
the table name in the geopackage).
We need a way for models to be able to explicitly specify a layer
name for this algorithm to be useful in models, otherwise the
auto-generated temporary layer names are used (which are not
very nice!)
Unlikely to happen, but it does occur with some layers coming
from processing models. In any case we want QGIS to be super-tolerant
of corner cases like this!
Discovered by Nyall while working on PR #5708
Tessellation would shift coordinates because when points got reprojected
to the new base, the Z coordinates were considered zero (which worked only
when all points were on the same plane).
Previously the walls always had horizontal top/bottom, but
in vertex binding mode the walls need to have different z values
at the start and end coordinate
Note that the unit test exposes a different bug in the tesselator,
which should also be fixed...