52751 Commits

Author SHA1 Message Date
Matthias Kuhn
d6f434550e
Merge pull request #8693 from m-kuhn/raii_qgscoordinatetransform
RAII for QgsCoordinateTransform locking
2018-12-18 13:32:42 +01:00
Matthias Kuhn
1e34e75de5
Merge pull request #8692 from m-kuhn/fixSingleLayerErrors
Allow saving a layer after fixing invalid geometries
2018-12-18 13:32:16 +01:00
Nyall Dawson
7c0b68a990 Fix broken select/identify by polygon when layer CRS <> canvas CRS
Fixes #20786
2018-12-18 18:11:52 +10:00
Nyall Dawson
7d648e5b51 Improve Python __repr__ handling for null geometries
Also avoid massive long __repr__ strings for complex geometries,
as these can flood the Python console (and first aid plugin),
and aren't useful for debugging anyway.

Refs #14640
2018-12-18 18:11:22 +10:00
Peter Petrik
d072a13234 add MDAL formats info to README 2018-12-18 08:27:51 +01:00
Nyall Dawson
089a2f1c17 [FEATURE][layouts] Add new setting to control whether map items
should show partial labels

Layout map items no longer respect the default project setting
for "show partial labels", and instead have their own, per map
setting for this option. (Under the map item properties,
labeling settings button).

The map item setting always defaults to off (unlike the canvas
setting, which defaults to true for a new project) as layouts
should always default to the settings which produce the highest
quality cartographic outputs.

In general I suspect that most users would always want to avoid
rendering partial labels in layouts, but this setting was
previously so deeply hidden that most are unaware of how to
change it. (And previous discussion about changing the canvas
setting to hide partial labels deemed this default undesirable
for the canvas, where showing even a small part of a label
on the map border can help identify what sits just on/off
the edges of the map)
2018-12-18 15:32:29 +10:00
Nyall Dawson
524bc797a7 Move labeling settings button to map item toolbar 2018-12-18 10:31:24 +10:00
nirvn
1b98247414 Create icons for layout map item toolbar actions 2018-12-18 10:31:24 +10:00
Nyall Dawson
75b7d141ea [FEATURE][layouts] Add actions in map item properties to set map item
scale to match main canvas scale, and to set main canvas scale to
match map's scale

These mirror the existing settings for setting the extent from
the canvas and pushing the extent TO the canvas.
2018-12-18 10:31:24 +10:00
Nyall Dawson
cdd23e663e [needs-docs][layouts] Move pushbutton actions for map items up to
a toolbar in the map item properties panel

This moves the
- refresh preview
- set to map canvas extent
- view extent in map canvas

buttons from being oversized push buttons within the item properties
panel up to a new toolbar at the top of this panel. Apart from looking
better, it means these important actions are always visible regardless
of the scroll position of the item properties panel itself.
Additionally, it makes it possible to add MORE actions here without
overloading the UI (e.g. "set canvas extent to item extent")

TODO: better icons
2018-12-18 10:31:24 +10:00
Nyall Dawson
5acd7ffaef [processing] Add API to set default unit to distance parameters
Otherwise the API forces use of a corresponding CRS parameter in
order to determine the relevant distance unit, but this is not
always desirable
2018-12-18 04:39:06 +10:00
Nyall Dawson
9e1bf68902 [processing] Fix pixel centroids along lines handling of null geometries 2018-12-18 04:38:42 +10:00
Nyall Dawson
d1e9ce1f69 [api] Raises ValueError and TypeError exceptions when QgsGeometry.asPolyline()
is called on non-single-line geometries

Previously we would just return an empty list when geometries of invalid
type were used, but this is dangerous and we are safer to explicitly
raise errors preventing use of asPolyline() with incompatible geometry types.
2018-12-18 04:38:42 +10:00
Nyall Dawson
e2c482e5b0 [FEATURE] Allow creation of boolean fields when creating a new GPKG table
Booleans are supported by GPKG, so we should expose this functionality
2018-12-18 04:37:57 +10:00
Nyall Dawson
0295d9ca3f Add icon field boolean field type 2018-12-18 04:37:57 +10:00
Nyall Dawson
645ca2b351 [ogr] Fix conversion of boolean values
Fixes #20290
2018-12-18 04:37:57 +10:00
Nyall Dawson
4131e0b303 [layouts] Fix selected items appear in bold in all widgets
instead of just the items list panel

E.g. we don't want selected items to show in bold in the item
combo boxes
2018-12-18 04:37:17 +10:00
Matthias Kuhn
d77c74a2a4
More implicit sharing of geometries
Because massive cloning preemptively only makes sense when you want to fight the universe like in star wars.
2018-12-17 17:41:58 +01:00
Matthias Kuhn
1730a40a82
RAII for QgsCoordinateTransform locking
I experienced a freeze where the main thread was stuck in QgsCoordinateTransformPrivate::freeProj(), waiting for a write lock.
None of the other threads had anything useful in their stack trace that would have explained why the lock was not available.
The only explanation I can come up with is that an exception or thread termination was messing with the lock, leaving it in a
locked state.
By using RAII we can avoid this scenario.
2018-12-17 17:26:57 +01:00
Matthias Kuhn
0cb29004a4
Allow saving a layer after fixing invalid geometries 2018-12-17 16:52:57 +01:00
Matthias Kuhn
bebc34b4b8
Merge pull request #8689 from m-kuhn/prevent_crash
Safety guard to prevent crashes
2018-12-17 14:18:31 +01:00
Matthias Kuhn
cbe7ac65f6
Merge pull request #8687 from daniviga/rpm-fixes
[RPM] Improve RPM packaging
2018-12-17 14:12:23 +01:00
Peter Petrik
e4d490531c add support for browser dialog for mesh layer extensions too 2018-12-17 12:01:17 +01:00
Peter Petrik
39d168c09c fix travis build for mdal 2018-12-17 12:01:17 +01:00
Peter Petrik
8b542c8aa4 Update to MDAL 0.1.2 2018-12-17 12:01:17 +01:00
Peter Petrik
64b81bd976 use file filters from MDAL 2018-12-17 12:01:17 +01:00
Peter Petrik
e71660215c [processing] add QgsProcessingParameterMeshLayer parameter 2018-12-17 11:50:53 +01:00
Matthias Kuhn
6f63957797
Safety guard to prevent crashes 2018-12-17 10:35:46 +01:00
Matthias Kuhn
69298527d9
Run sipify 2018-12-17 09:43:11 +01:00
Daniele Viganò
a794992044
[RPM] Add support for HDF5
[RPM] Do not make qgis-server depend on httpd
[RPM] Add an Nginx configuration example
[RPM] Update server readme and replace wms with a better ogc
[RPM] More fixes for Epoch directive
[RPM] F27 reached EoL, replace it with F29
[RPM] Add support for netcdf and replace ogc with ows as server endpoint
[RPM] Add sample systemd service file
2018-12-17 08:36:08 +01:00
Nyall Dawson
c7cb5a8e3b [processing][SAGA] Fix output type of Zonal Grid Stats alg
and add unit test

Fixes #20815
2018-12-17 10:50:47 +10:00
Alessandro Pasotti
1ff3ddc61c
Merge pull request #8676 from elpaso/bugfix-20674-dbmanager-aliased-2
fix spatialite aliased, nested, joined queries
2018-12-15 14:54:55 +01:00
Alessandro Pasotti
e83e794016 spatialite: Add more test cases for table names with spaces 2018-12-15 11:08:05 +01:00
Alessandro Pasotti
8a0a745677
Merge pull request #8677 from troopa81/hidden_column
Correct the column hide/show status that was not saved anymore
2018-12-15 09:26:33 +01:00
Nyall Dawson
13e7186493 Wording 2 2018-12-15 11:28:56 +10:00
Nyall Dawson
63a5ebf57c Wording update 2018-12-15 11:28:56 +10:00
Nyall Dawson
8d7e21fc6d Test mask updates 2018-12-15 11:28:56 +10:00
Nyall Dawson
cd762da817 Doxygen 2018-12-15 11:28:56 +10:00
Nyall Dawson
d8eac4797e [FEATURE][API] Add method to QgsMapSettings for specifying label blocking regions
These represent areas of the map where NO labels should be placed
2018-12-15 11:28:56 +10:00
Nyall Dawson
ed25a3e2ee [FEATURE][layouts] Add setting for label margin for map items
This setting allows per-map control of how close labels are permitted
to be placed to the map item's edges.

Sizes can be set using mm/inches/pixels/etc, and data defined
label margins are allowed.

Fixes #10314
2018-12-15 11:28:56 +10:00
Nyall Dawson
35855b88e1 [FEATURE][API] Add API to set a margin for labels for layout map items
This controls how close labels are permitted to the edges of the map
item. The labeling engine will then try other candidate positions
in order to avoid placing labels within this margin.
2018-12-15 11:28:56 +10:00
Nyall Dawson
4252aabe00 [FEATURE][API] Add option to specify a custom boundary geometry
in QgsMapSettings to restrict where labels are allowed to be placed
within.

If set, this overrides the default behavior of allowing labels to
be placed anywhere inside the rendered map extent.
2018-12-15 11:28:56 +10:00
Nyall Dawson
abc7b037d8 [needs-docs][processing] Output count of retained and duplicate features from
Delete duplicate geometries algorithm.

This matches the output of the delete duplicates by attribute
algorithm
2018-12-15 10:44:33 +10:00
Nyall Dawson
82c13bdde0 [processing] Fix error when running delete duplicate geometries and
some input features have null geometries

Fixes #20788
2018-12-15 10:44:33 +10:00
Nyall Dawson
5c2f68e769 [processing] Throw error when attempting to use Distance Matrix with
multipoint datasets

There's no single approach to use for multi-point inputs, so instead
of overloading this algorithm with extra options to control how these
are handled, we raise a helpful error and push the reponsibility back
to the user to get the data into the right format before running the
tool.

Fixes #20799
2018-12-15 10:36:44 +10:00
Nyall Dawson
1285a01c64 Correctly test processing auth widget with real authentication setup 2018-12-15 08:23:10 +10:00
Nyall Dawson
56bd682d96 Avoid duplicate changed signals thrown by QgsAuthConfigSelect 2018-12-15 08:23:10 +10:00
Nyall Dawson
11ea28a5b3 [FEATURE][processing] Add a new parameter type for authentication config
This adds a new available parameter type for processing algorithms,
QgsProcessingParameterAuthConfig, allowing selection from available
authentication configurations (and creation of new ones).

It allows creation of processing algorithm which can fully take
advantage of QGIS' mature authentication handling, avoiding the
need to use insecure string parameters for users to input
sensitive logon credentials.

QgsProcessingParameterAuthConfig parameters are evaluated using
QgsProcessingAlgorithm.parameterAsString(), which returns the
selected authentication configuration ID.
2018-12-15 08:23:10 +10:00
Nyall Dawson
8f06b5a996 [ux] Remove custom group box styling and option for QGIS styled group boxes
This setting is causing issues on newer operating systems, e.g. MacOS
on dark themes. It's a 6 year old workaround for styling issues
which have likely since been fixed in Qt and the DEs themselves.
2018-12-15 08:22:42 +10:00
Nyall Dawson
0ca9777755 [api] Raises ValueError and TypeError exceptions when QgsGeometry.asPoint()
is called on non-single-point geometries

Previously we would just return QgsPointXY(0,0) when geometries of invalid
type were used, but this is dangerous and we are safer to explicitly
raise errors preventing use of asPoint() with incompatible geometry types.
2018-12-15 07:40:33 +10:00