4935 Commits

Author SHA1 Message Date
Nyall Dawson
a3a79b9a1e Fix network analysis routing fails in some cases (refs #11687) 2017-11-29 15:50:58 +11:00
Nyall Dawson
3341a3e91e Unify behavior of various geometry API leftOf tests
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
2017-11-29 10:04:20 +10:00
Radim Blazek
2f43deb9da closestSegmentWithContext() doc and test fix 2017-11-29 09:14:11 +10:00
Nyall Dawson
e34d7fb636 Fix left of test for linestrings
The test was returning invalid results for certain geometries
2017-11-29 06:45:33 +11:00
Blottiere Paul
a316530b86
Merge pull request #5744 from pblottiere/refrel_crash
[bugfix]  Fixes a crash in QgsRelationReferenceWidgetWrapper
2017-11-28 13:59:05 +00:00
Patrick Valsecchi
b8f708ff1b [FEATURE][needs-docs] Add OGC filters to WMS
Implement https://github.com/qgis/QGIS-Enhancement-Proposals/issues/104
2017-11-28 07:40:33 +01:00
Nyall Dawson
7a09f0890e
Merge pull request #5727 from nyalldawson/sublayer
Fix ogr sublayer handling of names containing ":"
2017-11-28 14:47:34 +11:00
Blottiere Paul
7ff6470df7 Add test 2017-11-27 16:11:55 +00:00
Martin Dobias
7bce7ea9ca [3d] Fix crash in tessellator with near coords (fixes #17286, fixes #17515)
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.
2017-11-27 17:01:38 +01:00
Blottiere Paul
4aa97d865d Add a test 2017-11-27 09:15:57 +00:00
Nyall Dawson
9bfb3f31ee Fix regexp_substr expression function returning whole match instead of captured group 2017-11-27 17:29:41 +10:00
Nyall Dawson
006da6e365 Move conversion of tesselation to multipolygon to QgsTessellator
Also
- add unit test
- fix bad tesselation due to missing origins
2017-11-27 06:54:29 +11:00
Nyall Dawson
3310343bcd [processing] Add a model-only "load layer to project" algorithm
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.
2017-11-27 06:38:21 +11:00
Nyall Dawson
6283ca62bc [processing] Add a model-only algorithm for renaming layers
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!)
2017-11-27 06:38:21 +11:00
Nyall Dawson
3d307b4109 Improve name of memory layers output from processing 2017-11-27 06:38:21 +11:00
Nyall Dawson
a95aecafd6 Fix tests 2017-11-26 16:28:59 +10:00
Nyall Dawson
f04587eb67 Update tests, add new test for complex layer name 2017-11-26 14:00:35 +10:00
Nyall Dawson
148380abef Fix inefficient QString splitting
QString::split with single characters is about 10x faster than
QString::split using QStrings
2017-11-26 12:45:06 +10:00
Nyall Dawson
144e9a2e45 Fix handling of ogr sublayers with ':' in their name
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!
2017-11-26 12:23:32 +10:00
Nyall Dawson
96857ebdd4 Fix crash when a geopackage layer is open in QGIS, and then is overwritten
with another layer with different field definitions
2017-11-26 07:34:51 +11:00
Alessandro Pasotti
72553a60a9
Merge pull request #5710 from elpaso/api-code-cleaning-int-2-enums
QgsVectorLayer code cleaning use enums instead of int
2017-11-24 16:16:26 +01:00
Matthias Kuhn
aaf70de71e Add test for QgsExpressionContextScope::takeScopes 2017-11-24 16:09:05 +01:00
Matthias Kuhn
fd127ee6a4 Fix file mode 2017-11-24 16:09:05 +01:00
Nyall Dawson
14531964a8
Merge pull request #5719 from nyalldawson/translate_z
geometries: translate Z/M
2017-11-24 22:12:11 +11:00
Nyall Dawson
4f08a35c21 Update test masks 2017-11-24 16:15:44 +10:00
Nyall Dawson
dd223d9b08 Allow transform methods in QgsAbstractGeometry/QgsGeometry to also
transform z/m values via scale/translate arguments
2017-11-24 15:34:35 +10:00
Nyall Dawson
03ec2d8a98
Merge pull request #5702 from nyalldawson/dxf_improve
[dxf] Add option to export labels as text elements, instead of mtext
2017-11-24 15:58:46 +11:00
Nyall Dawson
32834e9bf1 Update indentation 2017-11-24 14:57:39 +10:00
Nyall Dawson
f29eb7b19e Port and fix unit tests 2017-11-24 10:24:36 +10:00
Nyall Dawson
3c4fae0015 Readd tests for scalebars 2017-11-24 10:24:36 +10:00
Nyall Dawson
604e51d390 Restore some tests 2017-11-24 10:24:36 +10:00
Nyall Dawson
2a75ad8e96 More work on layout multiframe undo/redo 2017-11-24 10:24:36 +10:00
Nyall Dawson
e71d4d7c84 more attempts to fix multiframe undo 2017-11-24 10:24:36 +10:00
Nyall Dawson
f04d438572 Some undo/redo fixes for multiframe items 2017-11-24 10:24:36 +10:00
Nyall Dawson
c6eaf1f7fd Update test masks 2017-11-24 10:24:36 +10:00
Nyall Dawson
584cbd0734 Fix test failure 2017-11-24 10:24:35 +10:00
Nyall Dawson
dddce25e13 More work on porting multiframe items 2017-11-24 10:24:35 +10:00
Nyall Dawson
2cf99116d7 Resurrect tests for html item 2017-11-24 10:24:35 +10:00
Nyall Dawson
0e71505fe8 Fix a number of multiframe methods 2017-11-24 10:24:35 +10:00
Nyall Dawson
c4c0c83ca5 Restore api for handling layout item page numbers 2017-11-24 10:24:35 +10:00
Nyall Dawson
714920ff25 Start of multiframe porting 2017-11-24 10:24:35 +10:00
Nyall Dawson
c04b91f4f3 Fix some memory leaks 2017-11-24 09:31:50 +10:00
Nyall Dawson
117842802a Fix running processing tests multiple times 2017-11-24 09:31:50 +10:00
Nyall Dawson
abcdd48580 [ogr] Fix cannot create layers for geopackage datasets when
the database does not yet exist
2017-11-24 09:31:50 +10:00
Nyall Dawson
59d55fc44c [processing] Ensure correct sublayer is loaded when saving output
to destination with multiple sublayers
2017-11-24 09:31:50 +10:00
Nyall Dawson
f7a317be78 [processing] Fix saving outputs to non-file formats 2017-11-24 09:31:50 +10:00
Martin Dobias
a2ff3631d5 Fix tessellation of polygons that are not horizontal
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).
2017-11-23 14:09:03 +01:00
Alessandro Pasotti
4f82adf2c8 Update tests 2017-11-23 13:58:00 +01:00
Alessandro Pasotti
def85fa202 QgsVectorLayer code cleaning use enums instead of int
It was one of the TODOs for QGIS 3
2017-11-23 12:09:30 +01:00
Nyall Dawson
5206bf0f76 [3d] Fix creation of extruded walls in vertex binding mode
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...
2017-11-23 11:40:52 +01:00