2164 Commits

Author SHA1 Message Date
Marco Hugentobler
9ecded8b73 Comments 2020-06-30 13:06:53 +02:00
Marco Hugentobler
6ff2fe45ab Add possibility to set a minimum symbol size in layout legend. Minimum and maximum size are also valid for line widths 2020-06-29 17:37:02 +02:00
Marco Hugentobler
ab75840858 Sipify 2020-06-29 09:33:08 +02:00
Marco Hugentobler
f0ad33c8a9 [FEATURE] possibility to set a maximum marker size in layout legend 2020-06-29 09:02:05 +02:00
Nyall Dawson
edfdbdb427 Try to fix windows build 2020-06-28 15:50:10 +10:00
Nyall Dawson
ae8dbd884e More fine tuned profiling for vector layer loading in projects 2020-06-28 15:50:10 +10:00
Nyall Dawson
005ac8af2b [FEATURE] Add project load profile times to debugging tools dock
Now it's possible to get a breakdown of the various stages of
project load, in order to identify the causes of slow project
load times.

TODO: in 99% of cases this will be caused by one or more layers,
so it would be nice to further break down the individual layer load
times, e.g. so that for a WFS layer we see the time taken for
the initial server capabilities queries, etc...
For now, you just get the overall load time of each individual
layer.
2020-06-28 15:50:10 +10:00
Nyall Dawson
42a1ed1ce0 Fix clearing groups 2020-06-28 15:50:10 +10:00
Nyall Dawson
5c842a6286 [api] Rework QgsRuntimeProfiler for flexibility
- Make profiler thread safe
- Allow profiling of other, non-startup task groups (e.g. project
load times, map render times)
2020-06-28 15:50:10 +10:00
Alessandro Pasotti
7fa6f38689 Memory provider: roll back on errors
Long story short: calling provider's addFeatures
is implemented for some providers in a way that
will roll back all changes on errors, leaving
the backend storage unchanged.

Adding a QgsFeatureSink flag to control this
behavior allows certain providers to support
partial feature addition.

The issue comes from QgsVectorDataProvider::commitChanges
that is documented to leave the provider unchanged (roll
back) on any error, giving the client code the possibility
to fix errors (in the editing buffer) and re-commit.

Without a full rollback implementation in the memory
provider and after the type check introduction in this
PR we ended up with situations like this:

vl = ... an empty memory layer
self.assertTrue(vl.addFeatures([valid, invalid]))
self.assertFalse(vl.commitChanges())
self.assertEqual(vl.featureCount(), 1)  <--- fails!
We actually had 3 features from vl.getFeatures():
[valid, invalid, valid] (the first from the provider
the second and third from the editing buffer).

On the other hand, QgsFeatureSink would probably assume
that addFeatures will allow partial additions.

BTW: This is for sure the longest commit message I've ever
     written.
2020-06-20 04:30:18 +10:00
Alessandro Pasotti
f3bbc4d81c Use QgsField::convertCompatible to check for errors 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
39068c1cd5 Sipify 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
68baf74906 Add type check to file writer an memory layer
Fixes #36715

Adds a method to check for QVariant conversions, also
check for integral type narrowing so that for example
floating point 123.45 does not get down casted to integer
without raising an error.
2020-06-20 04:30:18 +10:00
Even Rouault
47da98c070 Raster resampling: add provider-level settings, and a switch at rasterpipe level between resamplingFilter and provider resampling
Also
* in settings UI, add a 'Early resampling' checkbox
* in raster properties UI, add similar checkbox
* serialize/deserialize new settings in QgsRasterLayer XML
2020-06-20 04:29:36 +10:00
Even Rouault
f32026c8e0 [GDAL provider] Fix misalignment of raster with overviews
Fixes #36820

The way QGIS is currently handling resampling is sub-optimal given GDAL >= 2
capability of having sub-pixel accuracy. So when a QgsRasterResampleFilter
is set, make it try to delegate resampling back to the underlying input interface,
and implement that improved resampling in the GDAL provider.

The GDAL resampling will take into account the settings of the QGIS resample
filter: zoom-in resampling kernel, zoom-out resampling kernel and max resampling
factor. The later is important to avoid performance issues if not enough overview
levels are generated (in the case, we will fallback to the generic method, which
may introduce sub-pixel shifts)
2020-06-20 04:29:36 +10:00
Harrissou Sant-anna
f2f7236fc8
Layout new name dialog
Make the new layout dialog use the qgsnewnamedialog class
Add/enable help button to open user manual chapters
2020-06-20 04:28:18 +10:00
Alessandro Pasotti
4b362629e8 GPKG and spatialite AUTOINCREMENT: get next value from sequence
for PK default value, fixes #37222

Also, fix dangling transactions for spatialite.
2020-06-20 04:24:55 +10:00
Nyall Dawson
4dc9b38142 Add API to retrieve QGIS version used to save a QgsProject
project.lastSaveVersion()

now returns the version number used to save the project.
Also cleanup QgsProjectVersion code

Fixes #37288
2020-06-20 04:21:53 +10:00
Denis Rouzaud
0cb8408425
more flags warnings fixes for Qt 5.15 (#37309)
* more flags warnings fixes for Qt 5.15

* fix sip compilation
2020-06-19 12:02:00 +02:00
Denis Rouzaud
7fb552d62d fix layout 2020-06-19 08:47:23 +10:00
Denis Rouzaud
044a05d828 run sipify 2020-06-19 08:47:23 +10:00
Nyall Dawson
b7eac07721 Add a render context flag so we know when a render operation is
occurring for drawing a symbol preview

Because these have no map association, certain settings like
sizes in "meters in map units" will have no meaning, and may need
special handling

Refs #28690
2020-06-17 08:02:49 +10:00
Nyall Dawson
d98fe9f989 [symbology] When rendering a multipart geometry, ensure that
geometry generator symbol is only rendered once, instead of
once per part

Fixes #23730
2020-06-16 06:04:14 +10:00
Peter Petrik
81d2e5658a fix sip 2020-06-15 08:54:04 +02:00
Matthias Kuhn
91f1485a6e
Merge pull request #36514 from lbartoletti/fix_interpolation_split
[BUGFIX] Fix interpolation on split geometry
2020-06-15 08:45:59 +02:00
Vincent Cloarec
b5d61594ee
mesh layer expose datasetIndexAtTime() (#37197)
mesh layer expose datasetIndexAtTime()
2020-06-15 08:32:33 +02:00
Nyall Dawson
8d4f00b0af Remove TODO comments included in public API documentation
This is just "airing our dirty laundry". We don't want/need end users
to see this.
2020-06-15 13:43:58 +10:00
Nyall Dawson
67896ebabc Fix some doxygen warnings 2020-06-15 13:43:58 +10:00
Nyall Dawson
74400c7ff8 Some fixes to numbered list handling in dox/PyQGIS API 2020-06-15 13:43:58 +10:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Nyall Dawson
e653711509 QgsGeometry::error() does not exist, should be lastError() 2020-06-15 13:43:58 +10:00
Nyall Dawson
a5101f2ade [sipify] Fix header formatting 2020-06-13 16:49:14 +10:00
Nyall Dawson
cedd73ee4d More list formatting fixes 2020-06-13 16:49:14 +10:00
Nyall Dawson
561a8326c5 Modernize language
And avoid insensitive/trigger words (as far as possible -- some are
coming from Qt or other external APIs)
2020-06-13 16:48:38 +10:00
lbartoletti
04c3c0124f add an explanation 2020-06-12 15:39:36 +02:00
Blottiere Paul
01e879c5b0 Update QgsRuleBasedRenderer::RenderJob 2020-06-12 08:45:13 +10:00
Blottiere Paul
71cf5af210 Fix use of deleted function for QgsReadWriteContextCategoryPopper 2020-06-12 08:45:13 +10:00
Blottiere Paul
5d2b7d200d Fix use of deleted function for QgsReadWriteLocker 2020-06-12 08:45:13 +10:00
Blottiere Paul
fe2621d063 Fix use of deleted function for QgsRenderedFeatureHandlerInterface 2020-06-12 08:45:13 +10:00
Blottiere Paul
7c752cb89d Fix use of deleted function for QgsEffectPainter 2020-06-12 08:45:13 +10:00
Blottiere Paul
7ac386bf0b Fix use of deleted function for QgsLinearMinMaxEnhancementWithClip 2020-06-12 08:45:13 +10:00
Blottiere Paul
39b63cbbdc Fix use of deleted function for QgsRuleBasedRenderer::RenderJob 2020-06-12 08:45:13 +10:00
Martin Dobias
b2da49b78b [vector tile] Fix issue with disappearing features (fixes #36982)
The issue was that renderer/labeling were only keeping "their" required fields,
but the final fields may have been extended by the other, making the field indices
cached in expressions invalid.

The fix is to keep the final QgsFields around and avoid creating those QgsFields on-the-fly
from previously requested fields.
2020-06-11 14:39:45 +02:00
lbartoletti
e69116fb34 revert changes in qgsgeometry.sip 2020-06-11 07:50:49 +02:00
Nyall Dawson
ae42850d08 Sipify 2020-06-11 13:29:59 +10:00
Nyall Dawson
860dff9fb0 Fix a broken list 2020-06-11 13:29:59 +10:00
Nyall Dawson
c795ddb1e9 Updates 2020-06-11 13:29:59 +10:00
Nyall Dawson
d3a54eed6f Add flags to control geometry to WKB export behavior
With initial flag to force conversion of triangle types to polygons
2020-06-11 05:32:26 +10:00
Nyall Dawson
8d00ae8638 [legends] Fix corrupted data defined legend rendering in layout designer
Fixes #36765
Fixes #34658
2020-06-11 05:30:42 +10:00
Nyall Dawson
98d618b444 Tighten includes 2020-06-11 05:30:42 +10:00