5842 Commits

Author SHA1 Message Date
Nyall Dawson
34a2ca0dc0 [needs-docs][labeling] Drop setting to control label solution method
from project labeling settings

This is an unnecessary setting, resulting in 1000's of extra, very complex
and untested lines of code. Furthermore, the differences are almost non-existant
and it's extremely unlikely end users would (or should) need to change this
setting.
2019-08-09 09:38:04 +10:00
lbartoletti
3afe7ad769 Fix BSD/Clang build 2019-08-09 08:47:00 +10:00
Juergen E. Fischer
54e846419f fix mac build 2019-08-08 21:02:30 +02:00
nirvn
6a75d9d997 [text renderer] Add rotation-based orientation mode 2019-08-08 16:59:22 +07:00
Nyall Dawson
eface49a6a Try to hide member from sip 2019-08-07 21:53:16 +10:00
Nyall Dawson
dca0f3f4fa Add API to allow rendered feature handlers to indicate which attributes
they require

And ensure these are fetched in the iterator used for rendering features
2019-08-07 21:53:16 +10:00
Nyall Dawson
c71cd4b5fc Initial work on rendered feature handler interface
Adds an interface for classes which provider custom
handlers for features rendered as part of a map render job.

QgsRenderedFeatureHandlerInterface objects are registered
in the QgsMapSettings objects used to construct map render
jobs. During the rendering operation, the handleRenderedFeature()
method will be called once for every rendered feature, allowing
the handler to perform some custom task based on the provided
information.

They can be used for custom tasks which operate on a set of
rendered features, such as creating spatial indexes of the
location and rendered symbology bounding box of all features
rendered on a map.
2019-08-07 21:53:16 +10:00
Nyall Dawson
0419f182d8 Use a more appropriate, global snap to grid algorithm when simplifying
geometries for layout exports

This avoids all chance of slivers or overlaps between previously
adjacent features.
2019-08-07 15:57:26 +10:00
Nyall Dawson
d8d23b56ea [FEATURE][layouts] Add option to simplify PDF or SVG exports
This new setting, "Simplify geometries to reduce output file size",
is exposed in the SVG or PDF export settings dialogs shown when
exporting a layout/atlas/report to PDF or SVG.

If checked (the new default), geometries will be simplified while exporting
layouts in order to remove any redundant vertices which are not
discernably different at the export DPI. (e.g. if export DPI is 300 dpi,
vertices less then 1/600 inch different from each other will be removed).

This avoids exporting ALL geometry vertices during PDF/SVG export,
which can result in a ridiculously complex and large export file size.
Aside from the file size issues, it also causes problems when trying
to load these outputs into other applications, e.g. Inkscape, which
chokes on the huge number of vertices and grinds to a crawl.

Sponsored by the GeoPDF export group
2019-08-07 15:57:26 +10:00
Nyall Dawson
daf3491b5e [layouts] Add vector simplification method to QgsLayoutRendereContext
Allows specification of simplify method to use when rendering layouts
2019-08-07 15:57:26 +10:00
Nyall Dawson
615e245b18 Add method to specify global vector simplification overrides on a
QgsMapSettings object

If specified (they default to off), these simplification settings
will override any layer-specific simplification settings, and
provide a way for specifying a global simplication to apply
to vector layers while exporting maps.
2019-08-07 15:57:26 +10:00
Nyall Dawson
286b967917 Consistent dox 2019-08-07 10:40:30 +10:00
lbartoletti
03f48bdbd8 Rewriting documentation 2019-08-07 07:30:19 +10:00
lbartoletti
aaa6f65537 topologicalEditing: Fix Z for add feature 2019-08-07 07:30:19 +10:00
Nyall Dawson
35fc3799cd Dox++ 2019-08-07 06:26:04 +10:00
Nyall Dawson
b4c4c99250 Improve QgsRasterLayer dox 2019-08-07 06:26:04 +10:00
Alessandro Pasotti
92ac7a2e93
[server] Server api and WFS3 (#10016)
Implementation of OGC API and WFS3 core draft specification
2019-08-06 16:38:21 +02:00
Denis Rouzaud
e4faaf4988
add __repr__ for QgsMapLayer (#31108) 2019-08-06 13:36:14 +02:00
Nyall Dawson
e3fbe28148 Fix incorrect /Factory/ annotation 2019-08-06 21:31:59 +10:00
nirvn
ec75aa0300 [FEATURE][text renderer] Support vertical text orientation 2019-08-06 13:24:15 +07:00
Nyall Dawson
126ccb9736 Apply same logic regarding joined fields as is used in field calculator
to QgsFieldProxyModel set to hiding read only fields

I.e. show editable joined fields, but only if they are set to a non-hidden
editor widget
2019-08-06 13:47:41 +10:00
Matthias Kuhn
619562ec3d More dox 2019-08-02 13:12:18 +02:00
Matthias Kuhn
60f4bc56e8 Add QgsWkbTypes::curveType method 2019-08-02 09:33:47 +02:00
Nyall Dawson
47f83b582f [FEATURE] Add "copy symbol" and "paste symbol" actions to layer right click, style menu
Allows for individual symbols to be copied and pasted between layers or rule/categorized/graduated
nodes
2019-07-31 20:49:43 +10:00
Nyall Dawson
a0f6ee7541 Sipify 2019-07-31 11:03:06 +10:00
Nyall Dawson
b9482dda6b Dox++, unit tests 2019-07-31 05:08:37 +10:00
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
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
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
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
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
Julien Cabieces
0dfa77ddb3 Add a new settings noProxyUrls and change UI to edit this setting 2019-07-23 19:03:51 +10:00