5978 Commits

Author SHA1 Message Date
Nyall Dawson
f49389d751 [layouts] API framework to allow rendering multiple map themes to layered exports 2019-08-20 14:58:14 +10:00
Nyall Dawson
446eb066d5 [needs-docs] Expose choice of GeoPDF export format to users
Either "ISO3200 extension" or "OGC 'best practice'" options are availab.e

ISO3200 format is recommended, and results in Geospatial PDF files compatible
with the built-in Acrobat geospatial tools.

The OGC Best Practice format results in GeoPDF files compatible with the TerraGo
suite of tools, but can break compatibility with the built-in Acrobat
geospatial tools (yes, GeoPDF format is a mess!).
2019-08-19 15:23:53 +10:00
Nyall Dawson
8d89dd99cd [FEATURE] Add option on whether to include RDF metadata during
save map to GeoPDF operations
2019-08-19 15:23:53 +10:00
Juergen E. Fischer
19220b9e06 fix windows build including some warnings 2019-08-17 11:58:04 +02:00
Nyall Dawson
93342a33ce [FEATURE] GeoPDF export in map renderer task (e.g. save as canvas)
Not exposed to UI yet
2019-08-17 14:53:11 +10:00
Nyall Dawson
b1e3d047d6 Make QgsMapRendererStagedRenderJob thread safe 2019-08-17 14:53:11 +10:00
Nyall Dawson
a4d1b293a0 QgsMapRendererTask was NOT thread safe! ouch 2019-08-17 14:53:11 +10:00
Nyall Dawson
1a294df22a Start on GeoPDF exporter class 2019-08-17 14:53:11 +10:00
Alessandro Pasotti
a3c4eb9947
Providers connections interface API
This is the implementation of the new DB connections API (grant proposal 2019).
Summary

The new API makes it available to QGIS core a new interface for provider connections and will allow to:

    replace the provider specific QgsSettings management in QGIS4 (save/load connections from the settings) NOT IN SCOPE FOR NOW.
    provide a unified API for common operations on DB connections:
        executeSql and get the results
        list tables names and properties and schemas
        create a new vector table (no rasters for now)
        create/rename/drop schemas and tables
        vacuum
       ....
2019-08-16 20:44:05 +02:00
Matthias Kuhn
3245376e64
Merge pull request #31167 from signedav/default-values-update
Update widgets with default values on attribute form
2019-08-16 16:42:39 +02:00
nirvn
bdf18ee0fd Add a QgsStringUtils function to substitute characters with vertical representation counterparts 2019-08-16 13:56:19 +07:00
David Signer
38e4bacb7d missing sip 2019-08-15 11:03:19 +02:00
lbartoletti
8ff30072da topological editing: fix copy/move feature 2019-08-14 09:03:51 +10:00
lbartoletti
e5cd1aa913 Topological editing: fix vertex tool (Z support) (#31163) 2019-08-14 09:00:58 +10:00
Nyall Dawson
2074f2c9fc Warnings 2019-08-14 06:46:19 +10:00
Nyall Dawson
be4e7b1088 More attempt to fix doxygen warning 2019-08-14 06:46:19 +10:00
Nyall Dawson
b4a172f87e Dox fixes 2019-08-14 06:46:19 +10:00
Nyall Dawson
f0d60952bf Dox++ 2019-08-14 06:46:19 +10:00
Nyall Dawson
4f81a88812 [layouts] Add flags to control whether labels are split to multiple
layers in multi-layer exports
2019-08-14 06:46:19 +10:00
Nyall Dawson
de3b886313 Fix generation of layer names for exported multi-layer map exports 2019-08-14 06:46:19 +10:00
Nyall Dawson
56609123fc [layouts] Rework API for item export to multi-layered exports
Reworks the QgsLayoutItem API for handling multi-layered exports
to work as an iterator. The advantage with this is that it avoids
items needing to calculate in advance how many layers they require
in the output file.
2019-08-14 06:46:19 +10:00
Nyall Dawson
244eb92a82 Add QgsMapRendererStagedRenderJob
This map renderer job subclass is designed for step-by-step rendering
of a map to different QPainters.

It exposes an API which lets callers iterate over parts of a map
(e.g. individual map layers, labels), specifying a destination
QPainter for each step in the iteration.

This is designed to improve the existing print layout export to
layered output map rendering, where currently the maps are rendered
by multiple renderer jobs, each only rendering one layer at a time.
This current approach of rendering individual layers are separate
jobs is fundamentally broken (and cannot be fixed), because it
prevents any handling of interactions between map layers (e.g. shifting
colliding labels).
2019-08-14 06:46:19 +10:00
Nyall Dawson
da2df20712 Start splitting out parts of QgsMapRendererCustomPainterJob to an intermediate base class 2019-08-14 06:46:19 +10:00
Nyall Dawson
a46803844a [layouts] Add an indicator in the status bar while a map redraw is
occurring in the background

Otherwise there's no way to tell if a redraw is humming away in
the background, or is completed...
2019-08-13 18:27:38 +10:00
nirvn
f623c52fdf [needs-docs][layout] Give user explicit option to georeference (or not) PDF exports 2019-08-12 19:21:17 +07:00
Nyall Dawson
ba800662a0 Use reference instead of pointer 2019-08-12 16:12:03 +10:00
Nyall Dawson
0f2a4828e4 Better display names for page items
These can't have ids set, so default to a nicer looking name
2019-08-12 16:12:03 +10:00
Nyall Dawson
276a34fd12 Add API to set/retrieve plural variants of layout item type names (e.g. Labels instead of Label) 2019-08-12 16:12:03 +10:00
Nyall Dawson
208beb7f8c [layouts] Improve logic of splitting layouts into separate layers when
exporting to a multi-layer format

Now, items are either
- placed onto the same layer as other items (simple items like labels, lines, pictures)
- placed onto the same layer as only other items of equal types (semi-complex items like scalebars or pages)
- placed onto their own unique layers (complex items like legends, maps)

Plus lots of tests covering this, where previously there was few
2019-08-12 16:12:03 +10:00
Nyall Dawson
b6ab6df69f Also allow retrieving map layer ID associated with a layout export layer 2019-08-12 16:12:03 +10:00
Nyall Dawson
3fe851a306 API Improvements to handling layered layout exports, add tests
Fixes #20253
2019-08-12 16:12:03 +10:00
Nyall Dawson
568aabb6dd Add method to determine whether a layout map has any grids or overviews enabled 2019-08-12 16:12:03 +10:00
Nyall Dawson
53075ad720 Provide rendered feature handlers access to render context 2019-08-12 16:12:03 +10:00
Nyall Dawson
4636773bd6 Add API to register rendered feature handlers for a layout map 2019-08-12 16:12:03 +10:00
nirvn
2e4a5677b5 [FEATURE] Add option to georeference PDFs and TIFs to save map canvas as image/PDF 2019-08-12 12:10:01 +07:00
Nyall Dawson
c965f5fb75 Fix misleading dox, memory leaks in renderer widgets 2019-08-12 11:59:12 +10:00
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