5806 Commits

Author SHA1 Message Date
Alessandro Pasotti
8ffdb4ae28 Remove old incomplete documentation 2019-06-06 11:57:19 +02:00
Nyall Dawson
8b16e05998 Cleaner handling of raster provider native resolutions 2019-06-06 17:11:06 +10:00
Nyall Dawson
a98d12e1e0 Dox 2019-06-04 06:18:17 +10:00
Nyall Dawson
1bc716fc61 [labeling] Fix incorrect bounding box of labels used when
map is rotated

Fixes #24680
2019-06-04 06:18:17 +10:00
Nyall Dawson
004b7d879a [labeling] Fix cannot use labeling map tools when canvas is rotated
Fixes #25384
2019-06-04 06:18:17 +10:00
Nyall Dawson
789dbb570b Add friendly, descriptive errors when opening a project which has
preset non-default coordinate operations set between a crs pair,
which use grids that are not available on the local system
2019-06-03 16:46:54 +10:00
Nyall Dawson
f758bb7214 Add mechanisms to set handlers for coordinate transform creation errors and warnings 2019-06-03 16:46:54 +10:00
Nyall Dawson
d754a09296 Refactor to extract useful method 2019-06-03 16:46:54 +10:00
Nyall Dawson
a4e5e6a598 [needs-docs] Append a local, user writable folder to proj 6 search paths
Now, proj will search in the current user profile "proj" folder (e.g.
.local/share/QGIS/QGIS3/profiles/default/proj" on linux) for
grid files and other proj helper files.

This allows users (and plugins) to install grid files and make them
available for use in QGIS without requiring administrator access
to the system.
2019-06-03 10:38:22 +10:00
Nyall Dawson
c82d3b643f Upgrade QgsCoordinateTransformContext for proj 6
This reworks (on proj 6 builds only!) QgsCoordinateTransformContext
to use proj strings of proj coordinate operations to handle the
users' preferred list of operations when transforming coordinates
between two CRSes.

Previously, the context heavily utilised internal transform ID
numbers, which were QGIS specific and relied on matching entries
from the QGIS srs.db file. This approach was undesirable because
it meant QGIS had to maintain and carry it's own table of
possible transform pathways between CRS pairs (which was difficult
to update, impossible to track, and most likely severely out of
date).

Now we can utilse Proj 6's (wonderful!) logic for determining the
best coordinate operation to utilise between two CRSes. All the
old API has been deprecated and no longer works under proj 6, but
that's unavoidable (and unlikely to be in use by plugins anyway,
it's VERY low level stuff).

A further bonus of this work is that QgsCoordinateTransform no
longer relies on proj strings of the source/dest CRS to build
the transform -- the issue with that approach was that proj
strings are lossy (and not always possible to generate), so
now by default we are generating better pathways between CRS
pairs.

This resolves issues with transforms which rely on pivot datums,
such as GDA94 - GDA2020 conversions.

Sponsored by ICSM
2019-05-31 10:38:08 +10:00
Nyall Dawson
0cf4ecf491 Deprecate a QgsCoordinateTransformContext members which don't
apply in proj >= 6.0 builds
2019-05-31 10:38:08 +10:00
Nyall Dawson
c61fb85ed6 Remove unused support for single source/dest settings in QgsCoordinateTransformContext
This has been #ifdef'ed out since it's original implementation,
and it has no meaning in the world of Proj >= 6.0
2019-05-31 10:38:08 +10:00
Nyall Dawson
7213030ad9 [labeling] Fix missing labels when multilinestring features are used in
conjunction with the "merge connected lines" setting

Refs #12173
2019-05-30 17:27:00 +10:00
Matthias Kuhn
6eb5b3e770 Add a template list to the welcome screen 2019-05-27 14:57:35 +02:00
Alessandro Pasotti
3f1ba81b7e Address PR comments (minor changes) 2019-05-27 09:20:34 +02:00
Alessandro Pasotti
564fd50e43 Fix spatialite handling of JSON arrays
Fixes #21986

plus:

- fix multiple string keys with commas in value relation widget
- more robust JSON and array (un)marshalling
- uniform array representation in value relation widgets
- lot of test coverage
- automatic QVariant type conversions in JSON utils
2019-05-27 09:20:34 +02:00
Denis Rouzaud
d7fa0286c4
do not insert layers in embedded groups (#10004)
fixes #29678
2019-05-26 23:25:15 -05:00
Nyall Dawson
85e207897b Add API to retrieve avaiable coordinate operations between a source
and destination QgsCoordinateReferenceSystem on proj >= 6 builds
2019-05-27 08:26:34 +10:00
Nyall Dawson
b4d18f8e0c Mark older datum transform methods as deprecated - they don't work under proj 6 2019-05-27 08:26:34 +10:00
Nyall Dawson
bed77bbfa8 Add method to retrieve underlying PJ object from a QgsCoordinateReferenceSystem
proj 6 only
2019-05-27 08:26:34 +10:00
Mathieu Pellerin
a888986567
[needs-docs][processing] Avoid field collision via optional prefix in overlay algorithms (#10092)
Makes for a more predictable collision avoidance, which
can be neccessary for some models.
2019-05-24 19:00:28 +07:00
nirvn
f9810a4534 [effects] Fix blur radius not taking dpi into account (fixes #14885) 2019-05-23 11:34:15 +07:00
Nyall Dawson
d8a5dfef06 Add missing dox to QgsRenderContext 2019-05-22 07:12:06 +10:00
Nyall Dawson
e23ceaa806 Mark render features methods as throwing QgsCsException, to allow it to be nicely caught in Python 2019-05-22 07:12:06 +10:00
Nyall Dawson
60deffbfa8 Add method to QgsRasterBlockFeedback to collect error messages
And append raster errors to rendering errors whenever encountered
2019-05-22 03:46:00 +10:00
Bas Couwenberg
2628c480c5 Don't include revision in sources.
Prevent changes to files that weren't changed between releases.
This eases review of the changes between releases significantly.
2019-05-17 16:47:47 +02:00
rldhont
943c7d5d90 [Processing] Define boolean output
In processing, if an algorithm has a boolean as an output, it cannot be defined as boolean but as a number.

To be more precise in algorithms description, the commit add QgsProcessingOutputBoolean.
2019-05-17 08:21:57 +10:00
Matthias Kuhn
00d31f6003 Revert "Merge pull request #10002 from m-kuhn/qgz-attachments"
This reverts commit 0804e342c863455fe7114e4fa84d8b9931656f8c, reversing
changes made to e07741f00b7d69cada35521f10d3703ff404083f.
2019-05-16 13:15:07 +02:00
Matthias Kuhn
a55c25bbeb Allow adding attachments in qgz files 2019-05-15 08:21:49 +02:00
Juergen E. Fischer
e9a80d6799 fix build 2019-05-12 17:19:50 +02:00
Alessandro Pasotti
9a612d4e19
Merge pull request #9832 from elpaso/qjson-nlohmann
Fast (and beautiful) json serializing
2019-05-10 11:33:10 +02:00
Nyall Dawson
85ff9aea31 Add method to retrieve map extent to QgsRenderContext
Previously only a "layer clipping extent" was available for retrieval
from a QgsRenderContext instance, yet there's a need for rendering
operations to have access to the original full extent of the map
being rendered.
2019-05-10 06:31:00 +10:00
Nyall Dawson
6b16218c0f Allow setting order by clause for aggregate calculation 2019-05-10 06:23:56 +10:00
nirvn
65ec9cd146 [symbology] Fix setSize(size) not working for ellipse markers 2019-05-08 13:18:02 +07:00
Alessandro Pasotti
ea0a70bd13 Merge branch 'qjson-nlohmann' of github.com:elpaso/QGIS into qjson-nlohmann 2019-05-03 20:15:24 +02:00
Alessandro Pasotti
bd3d75fce8 Indent on JSON export 2019-05-03 19:02:58 +02:00
vcloarec
109049ea86 Implementation of QgsMeshLayer::reload() and QgsMdalProvider::reloadData()
Implementation of this override method permit to reload mesh end dataset groups when the data changed outside of the QGIS application.
2019-05-03 15:26:22 +02:00
Alessandro Pasotti
748a73ab80 Fix 3D build 2019-05-02 17:39:50 +02:00
Alessandro Pasotti
bbd836f4d3 Update tests for geometry classes 2019-05-02 13:52:46 +02:00
Matthias Kuhn
ac6ed1a18c Doxygen for QgsSymbolLayer::setRenderingPass 2019-05-02 07:16:14 +10:00
nirvn
3747cf7870 [FEATURE][symbology] Unlock string as character for font markers 2019-04-30 18:32:03 +07:00
Nyall Dawson
38ef62e1cc Fix incorrect annotation scaling when exporting layouts
Previously, annotation size and position always used pixel units. This
did not work well when exporting layouts, resulting in tiny annotations
(it also caused issues when moving projects between hidpi/non hidpi
displays).

Instead, use millimeters for annotation size and position so that the
appearance is consistent across displays and works correctly in layout
exports.

Add lots of unit tests covering this.

Fixes #18373
2019-04-30 15:21:39 +10:00
Mathieu Pellerin
cd5642aca0 [FEATURE] Make the custom dash pattern dialog a style dock widget 2019-04-28 15:33:48 +07:00
Nyall Dawson
ebab2e128b Add missing /Transfer/ annotation 2019-04-26 12:59:26 +10:00
nirvn
cb9b3b458d Add forgotten since tags on new point pattern fill functions 2019-04-25 09:53:40 +07:00
nirvn
756964620a [FEATURE][symbology] Add offset settings for point pattern fill symbol layer 2019-04-24 16:53:40 +07:00
Nyall Dawson
9da6a03b50 Add API for specifying fallback CRS and layer WKB type to use
for QgsVectorLayer, when constructing a layer with a URI which
may be invalid

These may be used for layers where the geometry type/CRS is
known in advance, and where the layer path may not be
initially resolvable. (E.g. layers with a URI pointing to a
non-existant file). It is only ever used if the layer cannot
be resolved, otherwise the actual layer geometry type will be
detected and used for the layer.
2019-04-19 06:07:13 +10:00
Alessandro Pasotti
63711510b6 Dear Qt, I love you but ...
... you are too slow and QJson API is so ugly.

Now using this wonderful json lib:
https://github.com/nlohmann/json

Results in release mode (QJson tests are not shown but
QJson was even slower than string concat).

PASS   : TestQgsJsonUtils::testExportAttributesJson(Use json)
RESULT : TestQgsJsonUtils::testExportAttributesJson():"Use json":
     0.0022 msecs per iteration (total: 75, iterations: 32768)
PASS   : TestQgsJsonUtils::testExportAttributesJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportAttributesJson():"Use old string concat":
     0.0032 msecs per iteration (total: 54, iterations: 16384)
PASS   : TestQgsJsonUtils::testExportFeatureJson(Use json)
RESULT : TestQgsJsonUtils::testExportFeatureJson():"Use json":
     0.011 msecs per iteration (total: 96, iterations: 8192)
PASS   : TestQgsJsonUtils::testExportFeatureJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportFeatureJson():"Use old string concat":
     0.015 msecs per iteration (total: 64, iterations: 4096)
PASS   : TestQgsJsonUtils::testExportGeomToJson(Use json)
RESULT : TestQgsJsonUtils::testExportGeomToJson():"Use json":
     0.76 msecs per iteration (total: 98, iterations: 128)
PASS   : TestQgsJsonUtils::testExportGeomToJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportGeomToJson():"Use old string concat":
     0.85 msecs per iteration (total: 55, iterations: 64)
PASS   : TestQgsJsonUtils::cleanupTestCase()
2019-04-18 17:04:30 +02:00
Nyall Dawson
0f1660990f Store vector layer wkb type in xml
We can use this when restoring the layer, if the uri turns out
to be invalid at that stage (e.g. a file has moved). By storing
and falling back to the last known wkb type, we avoid unnecessarily
discarding the existing layer renderer, and can still show the
expected layer type in the layer tree.
2019-04-18 18:41:09 +10:00
Alessandro Pasotti
7032db27fa [server] Implement LAYERFONTCOLOR and ITEMFONTCOLOR
Fixes #21871
Fixes #21870

Funded by: Gis3w
2019-04-17 12:01:06 +02:00