6729 Commits

Author SHA1 Message Date
Matthias Kuhn
0437d4ad68
Add tests for quoting sqlite values 2018-12-19 14:44:28 +01:00
Matthias Kuhn
0f037daf47
Merge pull request #8649 from qgis/expression_function_decode_uri
Expression function `decode_uri`
2018-12-19 08:32:09 +01:00
Alessandro Pasotti
56ca46efa9
Merge pull request #8706 from elpaso/bugfix-20674-dbmanager-aliased-3
Fix views query tables in spatialite
2018-12-19 07:43:48 +01:00
signedav
03222c829a fix typo 2018-12-18 22:09:34 +01:00
Nyall Dawson
514c5e2ac5 [api] Raises ValueError and TypeError exceptions when QgsGeometry.asPolygon()
is called on non-single-polygon 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 asPolygon() with incompatible geometry types.
2018-12-19 05:22:11 +10:00
Nyall Dawson
06d5f924f6 More square brackets 2018-12-19 05:21:49 +10:00
signedav
40c6896fb9 check for GDAL Version and exclude by ifdef 2018-12-18 18:32:30 +01:00
Alessandro Pasotti
07d9d1dbb8 Fix views query tables in spatialite
There is still an old issue: views are only available
through DB manager.

Fixes #20674 - again

- Life is really simple, but we insist on making it complicated.
Confucius
2018-12-18 18:32:14 +01:00
Matthias Kuhn
7b876d81f8
Fix test 2018-12-18 13:47:46 +01:00
Matthias Kuhn
84584012ec
Add docs and tests for decode_uri 2018-12-18 13:47:46 +01:00
signedav
de12239b7e adding and removing json attributes 2018-12-18 09:33:07 +01: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
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
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
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
645ca2b351 [ogr] Fix conversion of boolean values
Fixes #20290
2018-12-18 04:37:57 +10:00
signedav
7dbd7a1100 basic tests for json writing 2018-12-17 16:26:06 +01:00
Peter Petrik
39d168c09c fix travis build for mdal 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
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
Nyall Dawson
8d7e21fc6d Test mask updates 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
1285a01c64 Correctly test processing auth widget with real authentication setup 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
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
Alessandro Pasotti
d4439b25c0 Fix spatialite exotic query layers (aliased, nested, joined ...)
Fixes #20674 (again)

“It does not matter how slowly you go as long as you do not stop.”
― Confucius
2018-12-14 15:10:01 +01:00
Alessandro Pasotti
b71a668a08 opencl rastercalc fix int input rasters and cast to float
Cast to float all math operations because when the
input is not a float or a double opencl raises
an error regarding which override should pick.

By casting to float we are sure that the right
function will be called.

This patch also fixes the buffer sizes for short (16bit)
and int (32bit) and asserts that siexe of float is 32bit.
2018-12-13 18:36:47 +01:00
Matthias Kuhn
4e38193bf3
Merge pull request #8627 from m-kuhn/represent_class_values
Use represention values for classified renderers [FEATURE]
2018-12-11 16:44:17 +01:00
signedav
607dffd1aa basic tests for json type in gpkg 2018-12-11 13:12:35 +01:00
Matthias Kuhn
ad2a5cb626
Code styling 2018-12-11 10:42:44 +01:00
Matthias Kuhn
1d3e7d46d9
Add test for QgsCategorizedSymbolRenderer::createCategories 2018-12-11 09:48:16 +01:00
Matthias Kuhn
bec04c1e44
Merge pull request #8600 from signedav/fix_gpkg_order
Offline editing to GPKG attribute order. Fixes #20276
2018-12-11 08:55:51 +01:00
nirvn
54f28dfbb9 [afs] Basic parsing capacity for label expressions 2018-12-11 12:54:00 +07:00
Nyall Dawson
7ed4218b00 [needs-docs] Upgrade project level setting for Label as Outlines/text setting to use newer API
And replace labeling engine dialog "Draw text as outlines" checkbox with a combobox
presenting the choice of always rendering as outlines OR text.

(This will allow us to easily add additional methods in future, e.g. potentially
a "Render as text wherever possible" setting, for defaulting to text objects
whenever it doesn't impact the rendering quality to do so)
2018-12-11 12:28:29 +10:00
Nyall Dawson
ea069ed60e Push text format rendering setting into QgsLayoutExporter 2018-12-11 12:28:29 +10:00
Nyall Dawson
6755cbd6cf Push text format setting to layout render context 2018-12-11 12:28:29 +10:00
Nyall Dawson
1eaf95a866 [api] Move setting to control how text is rendered to QgsRenderContext
The new QgsRenderContext::TextRenderFormat enum controls how text
should be handled during a render operation, e.g. whether to render
text as outlines (paths) or keep it as real text objects.

Deprecate previous arguments in QgsTextRenderer which handled
this same use case.

This allows us to make the setting vary per-render, instead of
having a single global flag controlling the setting. Ultimately
this will allow us to have different behaviour within the
canvas renders vs print layout exports.

Refs #3975
2018-12-11 12:28:29 +10:00
Nyall Dawson
44fbb89450 [API] Throw IndexError on some QgsCurvePolygon methods when invalid
interior ring index is requested
2018-12-11 09:46:22 +10:00
Nyall Dawson
a49bf9f68f Unit tests for item opacity 2018-12-11 09:45:37 +10:00
signedav
8fda2b7df8 use temp copy of points.shp 2018-12-10 17:53:01 +01:00
nirvn
24d4640bc7 [afs] Add halo/buffer support to label creation 2018-12-10 19:07:21 +07:00
nirvn
ffded6f1d8 [afs] Picture marker & picture fill width/height use points as unit type 2018-12-10 16:09:39 +07:00
nirvn
74172fc176 [afs] Fix picture marker ratio calculation 2018-12-10 16:09:39 +07:00
nirvn
22a66ef390 [FEATURE][AFS] Create labels when settings provied by server 2018-12-10 16:09:39 +07:00
Alessandro Pasotti
cf0442dac6
Merge pull request #8630 from elpaso/bugfix-20674-db-manager-sqlite-aliased-queries
sqlite accept aliased queries from db manager
2018-12-10 08:39:44 +01:00