4290 Commits

Author SHA1 Message Date
bdm-oslandia
60db820f19 Replace all use of 'referer' http header as single var by QgsHttpHeader class
* add wrappers in QgsHttpHeader to read from/write to QMap, QUrlQuery, DomElement
* add QgsHttpHeader in QgsDataSoureUri, QgsXyzConnection, QgsVectorTileProviderConnection::Data, QgsWmsAuthorization
* fix tests
2022-06-09 10:05:15 +10:00
bdm-oslandia
cb436fe3d6 Fixes for bad key names
* fix QgsHttpHeaders:
  * when key contains double //
  * clean old sub group before adding new key to avoid duplicate

* fix QgsHttpHeaderWidget:
  * QTableWidgetItem flags for value was not set
  * call to QTableWidget edit function fail
  * table was not cleaned properly when adding entries

* fix QgsHttpHeaders test
2022-06-09 10:05:15 +10:00
bdm-oslandia
ed0236782d Fix issue #48532
* add constructor without QgsSettings, using default
* add new const QgsHttpHeaders::KEY_REFERER
* add test for QgsOwsConnection
* QgsOwsConnection:
  * fix usage of "referer" by using QgsHttpHeaders
  * replace "qgis/" prefix by QgsSettings::Prefix::QGIS
2022-06-09 10:05:15 +10:00
uclaros
bb767336e7 fix docstrings 2022-06-08 09:41:57 +10:00
Nyall Dawson
486d3611ae Move more labeling enums to qgis 2022-06-03 18:20:03 +10:00
Nyall Dawson
7228526445 Further rework overlap/ always place label handling
- Move settings to be feature level, not layer level, and permit
data defined control of these settings
- Add additional option for overlap handling for "Always allow"
overlaps, which indicates that the user doesn't care at all
if the label overlaps other labels and that the ideal placement
should always be used for the label regardless of whether it
overlaps labels or not

To clarify further, the options are:

- Never Overlap : never ever place overlapping labels for the layer,
even if it means labels will be missing
- Allow Overls if Required: if the label can't otherwise be placed,
draw an overlapping label. This mode will cause the label to be moved
a less ideal placement if possible, e.g. moving the label further
from the center of a line or polygon, IF doing so will avoid overlapping
labels. But if there's no other positions possible, then draw the
label overlapping.
- Always Allow Overlaps": It doesn't matter at all if the label
overlaps other labels or obstacles, that's fine to do and the best
placement (e.g most central placement) should always be used even if an
alternate further placement is possible which avoids overlaps entirely.
2022-06-03 18:20:03 +10:00
Nyall Dawson
b337958277 Add missing file 2022-06-03 18:20:03 +10:00
Nyall Dawson
8bb64a0683 Split existing "Show all labels (including colliding labels)" into
two separate new options

This setting was ambiguous in meaning -- it could be interpreted
as either:

"I don't care about overlapping labels, use them when
you have no other choice"

OR

"I want to see labels for EVERYTHING in this layer, and I don't
care what you have to do to show me those"

This leads to situations like those discussed in #41043, where some
users interpret the setting as the first meaning and get confused
when eg. a curved label line layer starts showing horizontal placements
for some features which couldn't otherwise be labeled (eg short
lines).

So, split the setting into two new options (checkboxes) with explicit, clear
distinction:

- "Allow overlapping labels if unavoidable": This setting means labels
can be overlapping, if there's no other option. It does NOT gaurantee
that all features in the layer will have labels, because other
constraints (such as lines too short to fit a label's text) will still
be respected and may prevent labels for the feature.

- "Allow inferior fallback placements": This mode permits features
to fallback to worse placement options when there's no other choice,
e.g. when a line is too short to fit a curved label text then the
label may be placed horizontally just over the feature's center
point.

The combination of checking BOTH options WILL gaurantee that
all features in the layer are labelled, albeit with both overlapping
labels and the degraded placements!

Fixes #41043
2022-06-03 18:20:03 +10:00
Nyall Dawson
6e5a99d332 Sipify 2022-06-03 13:13:43 +10:00
Nyall Dawson
c97f3ec8d6 Rename to isTransformationPossible 2022-06-03 12:02:13 +10:00
Nyall Dawson
7edcb9899e Add a constructor flag to QgsCoordinateTransform to ignore impossible
transformations, such as those which happen across different
celestial bodies

If set, the flag indicates that no user-facing warnings should be
shown and instead the transform should be short circuited
2022-06-03 12:02:13 +10:00
Nedjima Belgacem
8054467031
Save calculated statistics of a COPC file back into the dataset as an EVLR record (#48673)
* Implement saving stats as an EVLR

* Fix layout tests

* don't save statistics unless copc was generated by pdal

* Address Martin reviews

* Address reviews

* Only read stats EVLR and do not store count

* merge cleanup

* Address reviews
2022-06-02 19:24:03 +02:00
Nedjima Belgacem
e0348f8a62
Merge branch 'master' into point-cloud-stats-cleanup 2022-05-31 15:51:54 +01:00
NEDJIMAbelgacem
904a987c42 fix python test 2022-05-31 15:47:34 +01:00
Nyall Dawson
a3e72bdc52 Ensure that all units are changed when setting output unit for a symbol
Fixes #45961
2022-05-31 16:11:55 +10:00
NEDJIMAbelgacem
c5ac600dad - Remove useless functions
- Remove emit QgsTask::taskTerminated
2022-05-30 13:45:58 +01:00
NEDJIMAbelgacem
e2bf3809f7 Various fixes
- Remove waiting for task to finish in ~QgsPointCloudLayer
- Fix failing ept provider test when maximum threads is set to 1.
-  make PointCloudStatisticsCalculationState into enum class
- move AttributeStatistics outside QgsPointCloudStatistics
2022-05-27 03:02:12 +01:00
Nyall Dawson
f439a649d6 Optimise 3d clipping to work directly with coordinate arrays, so that
we avoid the (signficant) overhead of point conversion and sequence
allocations
2022-05-26 06:20:32 +10:00
Nyall Dawson
e912f29415 Hide QgsLineString::setPoints from python (raw pointers to arrays cannot be used through the bindings), dox update 2022-05-26 06:20:32 +10:00
Nyall Dawson
c94463144c Dox update for QgsBox3D 2022-05-26 06:20:32 +10:00
bdm-oslandia
f8139e1df8 fixes from review and rebase to master 2022-05-26 06:20:32 +10:00
bdm-oslandia
25d50c77db force rebuild 2022-05-26 06:20:32 +10:00
bdm-oslandia
eba8ff58b2 rebase from master 2022-05-26 06:20:32 +10:00
bdm-oslandia
8d151ecd4a QgsClipper: fix rename parameter for trimPolygon 2022-05-26 06:20:32 +10:00
benoitdm-oslandia
741c2aa4f1 Update python/core/auto_generated/qgsclipper.sip.in
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2022-05-26 06:20:32 +10:00
bdm-oslandia
52e130f699 Minor fixes
* QgsBox3d: fix scale function
* QgsLineString:
  - add setPoints function with data arrays
  - improve calculateBoundingBox3d
2022-05-26 06:20:32 +10:00
bdm-oslandia
0b03f01628 qgssymbol: readd 2d versions to optimize speed when no 3d involved 2022-05-26 06:20:32 +10:00
bdm-oslandia
7c24d34939 qgsclipper: replace addVertex by fastest QgsPointSequence<< operator 2022-05-26 06:20:32 +10:00
bdm-oslandia
15733b11fc qgsclipper: readd old clippedLine function prototype 2022-05-26 06:20:32 +10:00
bdm-oslandia
07d26a6e2f fix qgslinestring bbox calculation and qgsbox3d tests 2022-05-26 06:20:32 +10:00
bdm-oslandia
f569f59cda qgsbox3d: fix sipify 2022-05-26 06:20:32 +10:00
bdm-oslandia
f689b65149 fix qgsclipper documentation 2022-05-26 06:20:32 +10:00
bdm-oslandia
8e6a8fc8bb fix clipping for geocentric projections 2022-05-26 06:20:32 +10:00
NEDJIMAbelgacem
b5e2887a88 fix test 2022-05-24 10:04:33 +02:00
NEDJIMAbelgacem
f9a7094a9c Fix CI 2022-05-24 10:04:33 +02:00
NEDJIMAbelgacem
9d008c3de5 Address reviews and discussion 2022-05-24 10:04:33 +02:00
Nyall Dawson
4f204c2dff Better approach to filtering lists by tags which works across different
styles

Fixes #48659
2022-05-24 13:26:03 +10:00
Jacky Volpes
c31364f15a Enable category selection when saving style to database 2022-05-24 13:07:16 +10:00
Even Rouault
8dd00024f8 QgsDataSourceUri::parameterKeys(): rework 2022-05-24 08:30:40 +10:00
Even Rouault
d81b66d611 QgsVectorLayer(): make it clear that WFS URI parameter keys ar case sensitive (refs #46485) 2022-05-24 08:30:40 +10:00
Even Rouault
9969d6d2f5 QgsDataSourceUri: add a parameterKeys() method 2022-05-24 08:30:40 +10:00
Nyall Dawson
6ed55658af [processing] Fix crash after running model from history dialog
Ensure we don't store any map layer pointer values for long-term
use, and instead transform them to appropriate string values instead

Fixes #40258
2022-05-23 18:29:39 +10:00
Nyall Dawson
11d52c2cdb Add an optional "Silent" flag for QgsTask, which hides the operating
system level success/fail notifications for that task
2022-05-22 16:00:17 +10:00
Alessandro Pasotti
a3b554aa6e
Merge pull request #48497 from elpaso/server-temporal
Server WMS temporal properties support
2022-05-19 08:33:02 +02:00
Alessandro Pasotti
4a4e9f27d9 Pass context by const ref 2022-05-18 16:56:40 +02:00
Alessandro Pasotti
74d1a357b9
Merge pull request #48445 from elpaso/python-form-action
Expose form to d&d attribute form action buttons
2022-05-18 08:54:59 +02:00
Nyall Dawson
c6beb62216 Add project style database, which contains styles specific to each
individual project.

Project style database is embedded in the .qgz archive file
2022-05-17 16:36:00 +10:00
Nyall Dawson
c6ba421644 Cleanup some more of the default style/project instance initialisation spaghetti
And avoid some more QgsProject::instance() in core
2022-05-17 16:36:00 +10:00
Nyall Dawson
aa658465f8 Cleanup handling of default label format for project, and avoid a QgsProject::instance() use in core 2022-05-17 16:36:00 +10:00
Nyall Dawson
1251b115f4 Better way to mark styles as read only 2022-05-17 16:36:00 +10:00