4961 Commits

Author SHA1 Message Date
Nyall Dawson
b74a0efa34 Work on layout and layout item serialization and restoration 2017-12-07 08:49:33 +10:00
Denis Rouzaud
b72c569cf3 [doxygen] replace @see by \see 2017-12-06 08:31:12 -04:00
Blottiere Paul
b7fe407f55 Update tests 2017-12-06 07:56:11 +00:00
Blottiere Paul
cc660b186b Add some tests 2017-12-06 07:25:12 +00:00
Martin Dobias
ba9e19954b
Merge pull request #5798 from wonder-sk/polygon-3d-fixes
[3d] Tessellator fixes + culling mode configuration for 3D polygons
2017-12-05 10:54:48 +01:00
Nyall Dawson
fa5a8311d1 Fix coverity null pointer dereference warnings 2017-12-05 10:56:07 +10:00
Nyall Dawson
75c99800d0 Fix coverity ignored return value warnings 2017-12-05 10:34:33 +10:00
Nyall Dawson
b26c14ef04
Merge pull request #5799 from nyalldawson/mingw
Mingw build fixes and windows build warning fixes
2017-12-05 10:51:21 +11:00
Nyall Dawson
4689537842 Fix build warning 2017-12-05 08:30:52 +11:00
Martin Dobias
b773d617b1 [3d] Tessellator fixes + culling mode configuration for 3D polygons
- missing vertical walls since a recent tessellator crash fix (fixes #17604)
- choice of the culling mode - no culling / back face / front face (fixes #17619)
- more unit tests for tessellator
2017-12-04 22:28:14 +01:00
Nyall Dawson
113c21e8bf [geometry snapper] Don't create invalid geometries with duplicate nodes
Fixes #15247
2017-12-03 15:10:53 +10:00
Nyall Dawson
e12621ce2a Add API method to remove duplicate nodes from geometries
Removes duplicate nodes from the geometry, wherever removing the
nodes does not result in a degenerate geometry.

By default, z values are not considered when detecting duplicate
nodes. E.g. two nodes with the same x and y coordinate but
different z values will still be considered duplicate and one
will be removed. If useZValues is true, then the z values are
also tested and nodes with the same x and y but different z
will be maintained.

Note that duplicate nodes are not tested between different
parts of a multipart geometry. E.g. a multipoint geometry
with overlapping points will not be changed by this method.

The function will return true if nodes were removed, or false
if no duplicate nodes were found.

Includes unit tests and a processing algorithm which exposes
this functionality.
2017-12-03 14:58:21 +10:00
Nyall Dawson
0b452cabbb Spelling 2017-12-03 08:03:30 +10:00
Nyall Dawson
928afdd8c5 Fix geometry snapper sometimes creates unwanted overlapping segments
when snapping line layers

Because the default behavior of the snapper is to insert extra
vertices into the snapped geometry in order to make it 'follow'
the reference geometries exactly, this can result in unwanted
results for line layers where the resultant snapped layer
has overlapping line segments.

Since we can't always know what the desired result is that the
user wants (maybe they do want overlapping lines), instead
give them control over the result by exposing extra enum
options which never insert extra vertices.
2017-12-03 07:10:42 +10:00
Mathieu Pellerin
bec099ea33
Fix displayed extent for US National Atlas CRS (and others) on projection map (#5738) 2017-12-02 14:36:33 +07:00
Nyall Dawson
389435e1a0
Merge pull request #5729 from nyalldawson/proc_dyanmic
[processing] Expose dynamic ("data defined") numeric parameters to gui
2017-12-02 14:32:45 +11:00
Nyall Dawson
ecbc4718d4 [processing] Some more framework for dynamic (data defined) parameters 2017-12-02 11:16:26 +10:00
Nyall Dawson
9e4518fe42 [FEATURE] More output format choices in raster save as dialog
Previously only geotiff format was available, even though the
underlying QgsRasterFileWriter/GDAL libraries support other
formats.

This commit exposes those other formats to the dialog so that
users can directly save rasters to them (including everyone's
new BFF, geopackage).
2017-12-02 11:11:45 +10:00
Nyall Dawson
aaa18e0b89 Address review comments 2017-12-02 09:01:25 +10:00
Nyall Dawson
791eb91b9b Fix OGR provider cannot create attribute or spatial indexes for
GeoPackage/SQLite layers

Previously this capability was only exposed for shapefiles,
but was available in the spatialite provider. We don't use that
for GeoPackages, so I've ported the functionality across to
the OGR provider for these data sources.

Includes unit tests
2017-12-02 08:27:49 +10:00
Nyall Dawson
bcc1b91b74
Merge pull request #5717 from nyalldawson/layout_next4
[layouts] Port/adapt all remaining item types
2017-12-01 13:43:58 +11:00
Nyall Dawson
c12770d041 Indentation 2017-12-01 10:00:42 +11:00
Martin Dobias
8aa05735de
Merge pull request #5768 from wonder-sk/fix-17514-crs-change
Fix 3D view if terrain DEM is in different CRS
2017-11-30 17:30:30 +01:00
Nyall Dawson
ded892eaee [needs-docs] Add some shortcuts for opening the attribute table
Adds:
- shift + f6: show table filtered to selected features
- ctrl + f6: show table filtered to visible features

(These are alongside the existing 'f6' shortcut which opens the
table using the default mode set via the options dialog)
2017-11-30 20:23:40 +11:00
Martin Dobias
62543eb421 [3d] Cleaned up code for camera translation + tests 2017-11-29 11:45:30 +01:00
Nyall Dawson
e4ce62342c
Merge pull request #5758 from nyalldawson/leftof
Geometry "leftOf" improvements
2017-11-29 15:51:22 +11:00
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