1
0
mirror of https://github.com/qgis/QGIS.git synced 2025-04-05 00:05:32 -04:00

5078 Commits

Author SHA1 Message Date
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 , fixes )
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 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 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 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 

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
Alessandro Pasotti
9d8a39fac0
Merge pull request from elpaso/bugfix-17518-pg-import--without-schema
[bugfix][postgres] Browser panel D&D a layer onto a postgresql connection tree …
2017-11-23 07:53:57 +01:00
Nyall Dawson
07e4c57291 Add some unit tests for DXF export 2017-11-23 14:44:23 +10:00
Nyall Dawson
fada3d9ace Add unit test for package algorithm 2017-11-23 11:27:24 +10:00
Alessandro Pasotti
9f56878d88 [bugfix] Add some more logic to get the schema name if empty 2017-11-22 17:22:14 +01:00
Alessandro Pasotti
23dfb1de57 [bugfix] Browser panel D&D a layer onto a postgresql connection tree node icon fails without notice
Fixes  by defaulting to "public" if no schema is given
2017-11-22 13:02:15 +01:00
Blottiere Paul
fd1539f502 Skip test instead of commenting 2017-11-22 07:46:24 +00:00
Blottiere Paul
e29f605bb3 Add some masks and set a higher threshold for comparing images 2017-11-22 07:46:24 +00:00