15570 Commits

Author SHA1 Message Date
Nyall Dawson
03e2c4dae7 Add since 2019-07-31 05:08:12 +10:00
Sandro Mani
91d5c2d55c Add QgsUnitTypes::areaToDistanceUnit 2019-07-31 05:08:12 +10:00
Nyall Dawson
5af2e52fff Allow custom drop handlers to indicate that they will accept a mime type
in advance

Allows non-standard mime types to be dropped onto the QGIS window,
which will be handled by custom drop handlers
2019-07-31 05:06:50 +10:00
Sandro Mani
3cf94e98fc Inizialize QgsGpsInformation with sane values, add QgsGpsInformation::isValid and QgsGpsInformation::fixStatus 2019-07-31 02:51:46 +10:00
nirvn
0ffd1174db Address review 2019-07-30 18:06:26 +07:00
nirvn
ec99bd6240 [FEATURE][callouts] Add anchor point position settings for polygon features 2019-07-30 18:06:26 +07:00
lbartoletti
794a8efc81 Fixes empty WKT. Fixes #20753, Fixes #19190, Fixes #20754 (#9645)
* Fixes empty WKT. Fixes #20753, Fixes #19190, Fixes #20754
2019-07-30 09:34:53 +02:00
Nyall Dawson
2aec816b16 [needs-docs] Add option to show superseded (but not deprecated)
coordinate operations when selecting operations

This is the closest equivalent for the existing "hide deprecated"
checkbox which is available in proj < 6 builds.

Requires Proj >= 6.2
2019-07-30 07:24:53 +10:00
nirvn
8b5ba4a0cf Fix rebase gone wrong and address review 2019-07-29 15:14:34 +07:00
nirvn
3a37c83da7 [FEATURE][layout] Add horizontal placement option for scale bar labels 2019-07-29 15:14:34 +07:00
nirvn
e5deb5517b [FEATURE][layout] Add above/below segments placement option for scale bar labels 2019-07-29 15:14:34 +07:00
Nyall Dawson
4d5fe9a086 [FEATURE][callouts] Add setting to allow callouts to be drawn to all parts
of a multi-part feature

Also data-definable!
2019-07-29 11:18:10 +10:00
Nyall Dawson
bb9267d11b Record whether a callout corresponds to a feature which has all parts labeled in the callout context
This is useful information for dictating how a callout should be rendered
2019-07-29 11:18:10 +10:00
Nyall Dawson
802deddaf9 Sipify 2019-07-29 09:03:40 +10:00
Nyall Dawson
3484a0246d [labeling] Add API to allow curved labels to overrun features 2019-07-26 18:24:20 +10:00
Nyall Dawson
4c7f8a951d Add API to specify WKT format when exporting QgsCoordinateReferenceSystem objects
Like all good things, this is Proj 6 only.
2019-07-26 18:23:56 +10:00
Matthias Kuhn
c08b757bc4
Merge pull request #30927 from m-kuhn/source_select_reset
Reset selection when data source select dialog is reopened
2019-07-26 09:47:56 +02:00
Nyall Dawson
8ef960442d [processing] Use lists, not maps in overlap analysis algorithm
Ensures consistent field ordering and that fields are always matched
to input layer order
2019-07-26 10:21:20 +10:00
Matthias Kuhn
4e33bc1fcf
Merge pull request #30610 from signedav/fix_valuerelation
Fix multi-selection on value relation widget using string fields
2019-07-25 18:16:25 +02:00
Matthias Kuhn
fa847d16ff Fix code style 2019-07-25 16:00:04 +02:00
Matthias Kuhn
66cbab0a93 Code style for providers 2019-07-25 11:22:23 +02:00
Matthias Kuhn
a6875a7c78 Reset selection when data source select dialog is reopened
When the data source select dialog is closed and reopened it's much more
likely that the user wants to add a different layer than last time he was using
the dialog. So instead of offering him to add the same layer again, the selection
is cleared and he is requested to make a new selection.
2019-07-25 11:17:42 +02:00
Matthias Kuhn
a681e1ed45
Merge pull request #30836 from m-kuhn/raster_ignore_extent
[FEATURE] Allow rendering raster layers outside the reported extent
2019-07-25 10:24:12 +02:00
Nyall Dawson
da1b5637af Fix deprecated gdal import warnings 2019-07-25 11:25:51 +10:00
Nyall Dawson
83a842d44f Ensure ownership of path preprocessor is transferred 2019-07-25 08:41:28 +10:00
Nyall Dawson
2237c6ae99 [API][FEATURE] Allow setting a custom path pre-processor for QgsPathResolver
QgsPathResolver::setPathPreprocessor allows setting a custom path pre-processor
function, which allows for manipulation of paths and data sources prior
to resolving them to file references or layer sources.

The processor function must accept a single string argument (representing the
original file path or data source), and return a processed version of this path.

The path pre-processor function is called before any bad layer handler.

Example - replace an outdated folder path with a new one:

  def my_processor(path):
    return path.replace('c:/Users/ClintBarton/Documents/Projects', 'x:/Projects/')

  QgsPathResolver.setPathPreprocessor(my_processor)

Example - replace a stored database host with a new one:

  def my_processor(path):
    return path.replace('host=10.1.1.115', 'host=10.1.1.116')

  QgsPathResolver.setPathPreprocessor(my_processor)

Example - replace stored database credentials with new ones:

  def my_processor(path):
    path= path.replace("user='gis_team'", "user='team_awesome'")
    path = path.replace("password='cats'", "password='g7as!m*'")
    return path

  QgsPathResolver.setPathPreprocessor(my_processor)
2019-07-25 08:41:28 +10:00
Nyall Dawson
fee239dbcc Avoid storing and cloning paint effects for layers if they are just
the default stack unchanged

Speeds up cloning of symbol layers
2019-07-25 07:00:37 +10:00
Matthias Kuhn
e51a3babb7 Move WMS ignore extents to service level 2019-07-24 12:41:31 +02:00
Nyall Dawson
3174d692b1 Add a reserve method to QgsGeometryCollection
Attempts to allocate memory for at least the specified number of geometries.

If the number of geometries is known in advance, calling this function
prior to adding geometries will prevent reallocations and memory fragmentation.
2019-07-24 16:41:37 +10:00
Nyall Dawson
751f15410a Add move operators to QgsEffectStack
Results in a (very slight) performance boost with symbol copies
2019-07-24 06:31:11 +10:00
Denis Rouzaud
1dc7b2f6ed
allow to follow redirect for custom plugin repo url (#30869) 2019-07-23 12:53:33 +02:00
Julien Cabieces
0dfa77ddb3 Add a new settings noProxyUrls and change UI to edit this setting 2019-07-23 19:03:51 +10:00
Nyall Dawson
e208bc5888 Avoid cloning symbols during label rendering
This is expensive and unnecessary
2019-07-23 17:41:39 +10:00
Nyall Dawson
45b23fd5b2 [callouts] Allow callout types to have icons, and use them in the type combobox
...and pick ugly icons to prompt @nirvn into action ;)
2019-07-23 12:12:18 +10:00
nirvn
bc524b0e2e A couple of callouts dox fixes 2019-07-22 18:29:05 +07:00
nirvn
aab8e511bd [FEATURE][callouts] Allow specifying an offset from label area distance 2019-07-22 18:29:05 +07:00
lbartoletti
81c4b81b3b [bugfix] Fix the whole text instead of the selected part in db_manager save SQL file. fixes #30616 2019-07-22 18:41:01 +10:00
Nyall Dawson
2b554d8bab [FEATURE][callouts] Allow specifying an offset from feature distance
which controls a distance from the feature where callout lines end

Makes for visually more appealing callouts vs drawing them right
up against the edges of features
2019-07-22 18:40:08 +10:00
Nyall Dawson
8f6f04885b [FEATURE] Add @scale_value expression variable for use when evaluating
data defined text format properties while rendering scale bar text

Allows for per-label customisation of the text format inside scale bars
2019-07-22 11:34:32 +10:00
Nyall Dawson
a85d4d129b [FEATURE] Allow data defined settings in text formats
This allows text formats to store data defined settings,
allowing them to be used wherever the text renderer is (e.g. in
layout scalebar text).
2019-07-22 11:34:32 +10:00
Nyall Dawson
19a2b0e5d5 [api] Allow data defined properties to be set in QgsTextFormat, so
that these are automatically respected whenever the format is
rendered using QgsTextRenderer

This is done transparently to the caller - so by porting away
from the raw QPainter text apis to use QgsTextRenderer instead,
then they immediately gain the ability to use data defined
properties in their text formats.
2019-07-22 11:34:32 +10:00
Nyall Dawson
bae321ad28 Prioritize moving unplaced labels in the move label tool
These are most likely the ones which users are trying to move
when there's overlapping labels
2019-07-21 20:29:34 +10:00
Nyall Dawson
87282e5dd7 [needs-docs] Add checkbox to layout map label settings panel to allow
display of unplaced labels

This is independant from the main canvas setting, and can be used
to determine whether labels are missing from a particular layout map
2019-07-21 20:29:34 +10:00
Nyall Dawson
39d4145aae Append additional "QgsCalloutContext" member to callout rendering virtual
methods

While unused for now, this gives us flexibility in future to specify
additional useful contextual information about how a callout should
be rendered without breaking API (e.g. label text alignment, label
font settings, etc)
2019-07-21 20:29:34 +10:00
Matthias Kuhn
6ae23a180e [FEATURE] Allow rendering raster layers outside the reported extent
The extent reported by raster layers may be smaller than the area
which can be rendered.
Notably for WMS with symbology that takes more space than the data.

Fix #30251
2019-07-20 14:25:19 +02:00
Matthias Kuhn
4e0102f3b1
Merge pull request #30816 from m-kuhn/ellipsoid_from_first_layer
Update the project ellipsoid if CRS is taken from first layer
2019-07-20 10:29:54 +02:00
Matthias Kuhn
4505a4b03b For geometry validation GAP errors, allow zooming to gap or context
When a topological check returns a gap, it's sometimes better to zoom to the gap,
sometimes to show the gap in the context of the surrounding polygons. There is no
one-size-suits-all solution.
Therefore it's now possible to zoom to one by enabling the "zoom to feature(s)" button
also for topological errors.
2019-07-19 11:59:07 +02:00
Matthias Kuhn
ce8004446a Update the project ellipsoid if CRS is taken from first layer
Fix #30815
2019-07-19 11:08:39 +02:00
Nyall Dawson
d439484c27 Remove disableCache argument from python bindings 2019-07-19 13:39:06 +10:00
Nyall Dawson
9015a177d0 Disable CRS and transform cache permenantly when exiting Qgis
Hopefully this will prevent additional items being added to the cache
after we've gracefully finalised proj operations, which results
in the infamous crash-on-exit fiasco...
2019-07-19 13:39:06 +10:00