6778 Commits

Author SHA1 Message Date
Nyall Dawson
a913a6aa5a Create RAII QgsScopedRuntimeProfile class and Python context manager
to ease logging of runtime profiles.

Now it's possible to do:

    with QgsRuntimeProfiler.profile('My operation'):
      # do something

to automatically handle everything required to log the operation runtime
2020-05-19 04:35:34 +10:00
Nyall Dawson
1b4dd484bf Improve API for QgsRuntimeProfiler
Make it easier to nest profiled calls by removing the concept of groups,
and instead allow any profiled operation to have log child operation
runtimes as well as its overall runtime.
2020-05-19 04:35:34 +10:00
Nyall Dawson
6e7113024f [layouts][api] Expose to public API the option to create separate
files for each logical layer in a layout

The backend for this was previously used only when creating a GeoPDF
export, where we create an individual PDF per layout logical layer
which are then composited by GDAL.

By publicly exposing this functionality via the QgsLayoutExporter API
we allow for plugins which can export layouts to seperate logical
PDF files, allowing for other (non-GDAL) tools to be used to later
composite the layers (e.g. Adobe Illustrator (which stupidly cannot
handle multi-layer single PDF files!))

Sponsored by SMEC/SJ
2020-05-19 04:33:48 +10:00
nirvn
de918fde53 Fix tests 2020-05-18 14:34:45 +07:00
Nyall Dawson
2258e24f8c Fix dox test 2020-05-18 11:42:25 +07:00
Nyall Dawson
09fda8d285 Tweak API for QgsTemporalUtils::exportAnimation
Make it a bit more future-proof
2020-05-18 11:42:25 +07:00
Martin Dobias
68bbf46ebb Add QgsRasterDataProvider::transformCoordinates()
This is useful when client needs to find out image space coordinates of a point
in map layer coordinates or vice versa. For warped VRT rasters this can't be
simply done by using geotransform matrix because the transform may be more complex.

This may be also useful functionality for identify tool to show source raster
image coordinates.
2020-05-18 09:20:32 +10:00
Matthias Kuhn
bf485ec59a
Merge pull request #36427 from signedav/ressource_expression
[Server] Expression override for online resource in service capabilities
2020-05-15 15:51:00 +02:00
Matthias Kuhn
0617e52f19
Merge pull request #35875 from olivierdalang/tracing_curves_prototype
[feature] Curved geometries support for trace tool
2020-05-15 08:57:06 +02:00
nirvn
ba5b4166da [FEATURE][temporal] Add off and fixed range modes to temporal navigation 2020-05-15 13:47:02 +07:00
Nyall Dawson
db1062cdad [FEATURE][temporal] Add ability to export animation frames
Allows exporting of temporal animation frames to successive images,
for later stitching together in an external application.

Users have precise control over the image size and map extent.
2020-05-15 16:10:53 +10:00
David Signer
550ee2c0e0 dataDefinedServerProperties for the overrides of user defined server variables (currently only WMSOnlineResource) as QgsPropertyCollection alongside the ProjectProperties 2020-05-15 07:09:52 +02:00
Martin Dobias
5d59048387 [vector tile] Add basic GUI support for labeling configuration
This adds a new tab in the layer styling dock widget for vector tile layers.

The new QgsVectorTileBasicLabelingWidget class is based on the code used for QgsVectorTileBasicRendererWidget
2020-05-14 21:14:27 +02:00
olivierdalang
68582a6e84 [tracing curves] experimental notice 2020-05-14 16:12:29 +02:00
Matthias Kuhn
262568e6fb
Merge pull request #36285 from signedav/delete_cascade
Delete cascade on composition relations
2020-05-14 15:35:44 +02:00
David Signer
b9348302c4 use reference for fids in deleteFeatures and ensure that they exist until the end in qgsrelationeditorwidget 2020-05-14 10:40:00 +02:00
Vincent Cloarec
838faf8a3f
[MESH][FEATURE] use only specified dataset group (#36334)
[MESH][FEATURE] Allow to select only specific subset of dataset groups in mesh layer tree 

This could be done in the mesh layer properties dialog in the source tab.
A new tree view displays all the available dataset groups from the data provider. The dataset groups can be checked/unckecked and renamed.
This widget provides also buttons to load extra dataset group from files, to expand/collpase the tree, to check/unchek all items and to reset to default from the provider (for now, only the original name).
Then only the checked dataset group will be displayed in the active dataset widget in renderer settings.
2020-05-14 09:56:48 +02:00
David Signer
7c0d3b5829 const of QgsProperty and some styling 2020-05-14 09:48:41 +02:00
David Signer
66a5dbf470 remove paragraph 2020-05-14 09:37:30 +02:00
Alessandro Pasotti
1135941eca
Merge pull request #36399 from elpaso/bugfix-gh34813-osm-tiles
Fix xyx OSM tiles too many downloads
2020-05-14 07:42:34 +02:00
David Signer
3ea7b28aea project in the DeleteContext 2020-05-13 22:44:42 +02:00
David Signer
0e4b6b8cad WMSOnlineResource can be defined by an expression. This means it's stored as a QgsProperty.
Functions to read and write QgsProperty.
2020-05-13 19:39:31 +02:00
Paul Blottiere
dee58822af
Merge pull request #36370 from pblottiere/legend_json
Update the API to export a legend in JSON
2020-05-13 15:13:43 +02:00
Alessandro Pasotti
459bc53327 Re-use RenderPreviewJob flag to for Prefetch 2020-05-13 14:05:33 +02:00
Alessandro Pasotti
f029b1f959 Fix xyx OSM tiles too many downloads
Fixes #34813 by introducing a Prefetch rendering flag
and raster provider capability that can be set by
a provider when prefetching of out-of-viewport tiles
is allowed. For now it is only denied (hardcoded) for
OSM but the implementation allows per-layer setting when
a GUI element to set the flag will been created.
2020-05-13 13:41:40 +02:00
Nyall Dawson
f845189bde [feature][temporal] Add mode where start and end date are defined by expressions
Allows for handling any kind of corner case, e.g. start/end time in custom
string type fields, start/end time using numeric offsets from a reference
date, etc.

Fixes #36319
2020-05-13 20:20:00 +10:00
Nyall Dawson
8e0ea29988 [feature][temporal] Add option to "accumulate features"
Available when the mode is set to "Single Field with Date/Time"
(logically, it ONLY makes sense in this mode!), this setting
causes events to be visible whenever they have occurred before
or during the visible map temporal range.

Fixes #36321
2020-05-13 20:20:00 +10:00
Nyall Dawson
c162293a1b [feature][temporal] Add a fixed static duration option for vector
layers set to the "Single Field with Date/Time" mode

This allows layers with a single field representing the start date
but where all features have a constant event duration to play
nicely with the temporal framework

Also add user friendly descriptions for the various temporal modes
inside the widget

Fixes #26398
2020-05-13 20:20:00 +10:00
Nyall Dawson
3dce1bf173 [feature][temporal] Add "start field + duration field" mode for vector layers
Allows temporal filtering of layers which store a start time in one
field and a duration in a different numeric field. Users are given
a choice of temporal units for the duration (e.g. seconds, days, etc)
2020-05-13 20:20:00 +10:00
Blottiere Paul
86503e53fa Update doc 2020-05-13 10:47:25 +02:00
Blottiere Paul
1c28b69044 Update sip binding 2020-05-13 10:47:25 +02:00
Blottiere Paul
555d8863fa Update sip binding 2020-05-13 10:47:25 +02:00
Blottiere Paul
6550dad449 Update sip 2020-05-13 10:47:25 +02:00
Nyall Dawson
60d87e785a [temporal] Try to auto-populate reasonable initial choices for
vector layer temporal settings

When a new vector layer is loaded, we scan through the fields
for likely candidates for the start and end field choices. If found,
we initially setup the temporal properties to these guessed fields,
but we DON'T automatically enable temporal properties for the layer.

It's just a nice little shortcut, much like how we auto-guess the
appropriate title field for a newly added layer
2020-05-13 16:40:39 +10:00
olivierdalang
ab423ca2a4 Add "convert to curves" algorithm followup 2020-05-12 17:54:43 +02:00
David Signer
9995287eff comments and sipfiles 2020-05-12 17:32:06 +02:00
Matthias Kuhn
b2890f0b6b
Merge pull request #36283 from nyalldawson/html_colors
Respect HTML colors in labels
2020-05-12 13:16:56 +02:00
David Signer
fc6829cb60 feedback messages 2020-05-12 13:11:30 +02:00
Martin Dobias
a5160086ed Support TMS convention with vector tiles ({-y} instead of {y})
XYZ convention has zero Y at the top and increasing downwards,
but various map servers use TMS convention which has zero Y at
the bottom and rising upwards (within tile matrix)
2020-05-12 12:10:55 +02:00
Nyall Dawson
f2b03a8334 Doxygen test fixes 2020-05-12 19:21:39 +10:00
Nyall Dawson
99c8510709 Sipify 2020-05-12 15:37:22 +10:00
Nyall Dawson
180bbeccb8 PyQGIS syntatic sugar, start on tests for QgsTextDocument 2020-05-12 13:26:50 +10:00
Nyall Dawson
7dfc510771 Fix scalebar text size calculation when HTML formatting is used 2020-05-12 11:37:08 +10:00
Nyall Dawson
8b263162d5 Try to fix Travis build 2020-05-12 10:46:45 +10:00
Nyall Dawson
bf71382065 Don't try to reuse True value in enum, causes Python issue 2020-05-12 10:33:30 +10:00
Nyall Dawson
9a63810d82 Use composition rather then inheritance for QgsTextBlock/QgsTextDocument
Allows us to expose these to python and hopefully fixes compilation issue on Travis
2020-05-12 10:33:30 +10:00
Nyall Dawson
cb1e8445d3 Expose some more classes to Python, but mark as unstable API 2020-05-12 10:33:30 +10:00
Nyall Dawson
0e139992e3 Split massive qgstextrenderer.cpp/.h files into separate files per
contained class

and tighten includes to speed up recompilation
2020-05-12 10:33:30 +10:00
Nyall Dawson
e4b201a414 Code shuffle 2020-05-12 10:33:30 +10:00
Nyall Dawson
7fc9c555de More cleanups, avoid multiple parsing of the same HTML content for a label 2020-05-12 10:33:30 +10:00