267 Commits

Author SHA1 Message Date
Nyall Dawson
afd7698460 Extract utility functions for saving and reading raster color map definitions
to file to new QgsRasterRendererUtils class
2020-09-16 06:12:35 +10:00
vcloarec
07714f3931 port alg to c++
and minor fixes
2020-09-10 14:03:11 -04:00
Nyall Dawson
0b6af81cb1 Fix build 2020-09-06 21:07:25 +10:00
Nyall Dawson
5a7cb166d0 [annotations] Refactor annotation item subclasses so that they
work correctly with curved geometry types, and tweak some API naming
accordingly

There's no need to be restrictive and only require linear geometries
for these items!
2020-08-19 14:33:55 +10:00
Nyall Dawson
23848e0e89 Start cleaning up label line settings, by moving them from the
QgsPalLayerSettings mega class to a dedicated QgsLabelLineSettings
class
2020-08-17 11:12:33 +10:00
Nyall Dawson
25a78e1589 [api] Add QgsAnnotationPointTextItem annotation item class for
rendering text at a specified map point
2020-08-11 14:14:25 +10:00
Nyall Dawson
8300856615 Code shuffle 2020-08-05 16:27:09 +10:00
Nyall Dawson
b0e2a8b5a9 Add registry for annotation item classes 2020-08-05 16:27:09 +10:00
Nyall Dawson
c8e86aefc7 Move QgsAnnotationItem to its own file 2020-08-05 16:27:09 +10:00
Vincent Cloarec
de68f83cc3
Virtual dataset groups for mesh layer (#37605)
[FEATURE] Introduces mesh virtual datasets

With the mesh calculator the user can choose to create those "virtual" dataset groups that will be added to the layer. Then, for these dataset groups, values are not stored in memory but each dataset is calculated when needed whit the formula entered in the mesh calculator.

Those virtual dataset groups are saved with the project.

If needed, the user can remove them or can persist them on files to make them persistent.

Co-authored-by: Étienne Trimaille <gustrimaille@yahoo.fr>
2020-07-23 07:39:28 +02:00
Nyall Dawson
a34eabd1fb [api] Add a proper registry for 3D symbol types 2020-07-23 07:53:20 +10:00
Nyall Dawson
f60b79fcea Move QgsAbstract3DSymbol to core 2020-07-23 07:53:20 +10:00
nirvn
3b249d12ff [FEATURE][3d] Enable embedded and remote 3D models for 3D point symbols 2020-07-18 13:01:18 +07:00
nirvn
80627eb740 Add QgsSourceCache 2020-07-18 13:01:18 +07:00
Nyall Dawson
b10b16941b New class QgsMapClippingUtils with utility functions for helping
with map clipping
2020-07-02 12:07:51 +10:00
Nyall Dawson
04f51371fc Create new class QgsMapClippingRegion, for encapsulation of an area
and method to use to clip a map render
2020-07-02 12:07:51 +10:00
Denis Rouzaud
3322d2bb64 add QgsLayerTreeFilterProxyModel to easily use a layer tree 2020-06-05 14:21:30 +02:00
Nyall Dawson
4fdfa949cf [processing] Start porting Aggregates parameters to C++
Port parameter type to c++
2020-06-03 15:17:56 +10:00
Nyall Dawson
191e362ed4 Move FieldMapper parameter type to c++
Fixes sip "forgeting" about Python overrides for the type definition

Refs #36706
2020-06-02 08:43:54 +10:00
Denis Rouzaud
360827ade0 rename QgsBasemapPathRegistry to QgsLocalizedDataPathRegistry 2020-05-19 14:21:55 +02:00
Denis Rouzaud
b1920bb287 introduce QgsBasemapPathRegistry to hold a list of paths where basemaps can be located 2020-05-19 14:20:04 +02:00
Nyall Dawson
cb1e8445d3 Expose some more classes to Python, but mark as unstable API 2020-05-12 10:33:30 +10:00
Nyall Dawson
0e139992e3 Split massive qgstextrenderer.cpp/.h files into separate files per
contained class

and tighten includes to speed up recompilation
2020-05-12 10:33:30 +10:00
Nyall Dawson
e4b201a414 Code shuffle 2020-05-12 10:33:30 +10:00
Martin Dobias
299be94459 Review fixes 2020-05-08 12:55:08 +02:00
Nyall Dawson
d98defec1a [feature] Add basic temporal handling support for vector layers
This exposes some basic temporal capabilities for vector layers:
- static time range for layer (to match raster layer possibilities), this
sets a single static time range which applies to the whole layer. ALL
features from the layer will be shown whenever the canvas time
overlaps the layer time range
- "Single field with datetime": Allows selection of a single date
or datetime field from the layer. Features will be shown whenever
this field value is within the canvas time range
- "Separate Fields for Start and End Date/Time": Allows selection
of start and end date/datetime fields from the layer. Features will
be shown whenever the time interval calculated from these fields
overlaps the canvas time range

Some known limitations/inefficiencies:
- currently only date/datetime fields can be used. This was done
to simplify the format handling and avoid the need to worry about
string fields with different datetime formats. In future we should
allow selection of string fields and allow users to enter a custom
datetime format string
- unlike the Time Manager plugin approach, the approach taken here
is to rely completely on QGIS expressions and feature requests to
do the filtering (Time Manager uses layer filter strings and attempts
to set a native SQL filter syntax so that filtering is done on the
backend). This is intentional, because it provides a unified filter
approach regardless of the provider used (i.e. we don't need to worry
about the different SQL syntaxes used natively by the different
providers). The beauty of feature request expression compilation
**should** mean that the QGIS expressions are magically turned into
native backend queries, BUUUUUUUUUUUT... because we lack QGIS expression
support for date time literals, we currently rely on the "to_datetime"
expression function and coerce everything through strings. None of
the expression compilers handle this function, so currently ALL
filtering is done on the QGIS side. We need to add functions for
optimised datetime literal creation, and then ensure that the different
compilers correctly map these literals across to the backend
filter syntax to allow all the filtering work to be done on the database
side...

So currently, performance is much worse with large layers compared
to Time Manager. But, the advantage is that we can use the native
temporal framework and have vector layers animated alongside mesh
and raster layers!
2020-05-08 11:46:46 +10:00
Denis Rouzaud
ae5988cbb1 do not use template since they cannot be mixed with Q_OBJECT 2020-04-29 15:54:15 +02:00
Denis Rouzaud
82da0fd962 rename QgsFeatureChooser to QgsFeaturePicker 2020-04-29 15:54:15 +02:00
Denis Rouzaud
3cd237eca7 more work 2020-04-29 15:54:15 +02:00
Vincent Cloarec
f8fae3cf39
[FEATURE][MESH] 1D mesh width/color varying (#35926)
Introduce a renderer for 1D mesh edges that can vary width over the line. The line can also have different color based on the actual dataset value on the line's point.

Co-authored-by: Peter Petrik <zilolv@gmail.com>
2020-04-24 10:49:24 +02:00
Etienne Trimaille
471979aa50
move the QGIS Server validator from the project properties to its own class 2020-04-22 09:33:08 +02:00
Martin Dobias
41db54aa16 [FEATURE] Vector tiles writer API
Initial work... Currently supporting output to a directory based on XYZ template, using Mapbox vector tiles encoding.

New classes:
- QgsVectorTileMVTEncoder - low-level class that operates on a single tile, converts vector features to raw tile byte array, for internal use
- QgsVectorTileWriter - higher level class that manages generation of multiple tiles, for use by clients
- QgsVectorTileMVTUtils - assorted helper functions for MVT encoding/decoding
2020-04-21 13:28:56 +02:00
Nyall Dawson
b2167594fe Make handling of processing child algorithm dependencies more flexible
Instead of just using child ID strings, use a new dedicated class to
store dependency information
2020-04-16 16:02:53 +10:00
Martin Dobias
f8a6b9fa3a Add support for labeling of vector tile layers 2020-04-15 08:33:29 +10:00
Nyall Dawson
1b5f4dd771 New class QgsLegendPatchShape
Represents a patch shape for use in map legends.
2020-04-11 05:25:22 +10:00
Nyall Dawson
93f714d233 [FEATURE][API] Add new QgsFeatureSink subclass QgsRemappingProxyFeatureSink
This sink allows for transformation of incoming features to match the
requirements of storing in an existing destination layer, e.g. by reprojecting
the features to the destination's CRS, by coercing geometries to the
format required by the destination sink, and by mapping field values from
the source to the destination.
2020-04-07 17:05:44 +10:00
Nyall Dawson
c987e500bc Code shuffle to move QgsProxyFeatureSink to its own file 2020-04-07 17:05:44 +10:00
Nyall Dawson
0384ef03e6 Refactor picture north arrow handling to extract logic to seperate class 2020-04-06 14:04:20 +10:00
Nyall Dawson
632448c447 [FEATURE][layouts] New item type for marker symbols
Allows marker symbols to be placed directly on layouts, eg.
for manually placing markers over a map item or for creation
of advanced custom legends
2020-04-05 14:23:22 +10:00
Vincent Cloarec
75ddf3c7a6
[FEATURE][MESH] plug mesh layer to QGIS temporal framework (#35466)
[FEATURE] Use temporal controller for the mesh layer time handling.
2020-04-03 08:21:15 +02:00
Martin Dobias
53075848ce
Merge pull request #35341 from wonder-sk/vector-tile-layer
[FEATURE] Vector tile layer - part 1
2020-04-02 16:06:30 +02:00
Nyall Dawson
e788be93fa [processing][FEATURE] Add api for setting model component colors, and expose
the option to set manual colors for individual model comments
2020-04-01 18:20:09 +10:00
Martin Dobias
be98e2f0f6 [FEATURE] Raster layer contour renderer
This new renderer draws contour lines that are calculated on the fly
from the source raster band. It is possible to set interval of contour
lines and symbol used for drawing.

In addition there is support for "index contours" - contour lines
with higher interval, typically drawn with a wider line symbol.

If we generate contour lines on input raster block with the same size as our
output raster block, the generated lines would contain too much detail.
This detail can be reduced by the "downscale" factor - this will request
lower resolution of the source raster.
2020-03-31 08:51:54 +02:00
Martin Dobias
9e80f59f20 Use random colors, fix sip includes, fix warnings in server 2020-03-27 19:41:18 +01:00
Martin Dobias
bbc6af5ded Fixes to python bindings + some bits from code review 2020-03-26 19:31:00 +01:00
Martin Dobias
8105ad1fe5 Initial work on vector tile layer support 2020-03-25 13:27:11 +01:00
Nyall Dawson
78d445ee65 [FEATURE] Add numeric formatter "fraction" style
This style represents decimal numbers as vulgar fractions, e.g.
"3/4" instead of 0.75.

Options include using Unicode superscript and subscript characters
for nicer typography, e.g. ¹⁷/₂₃ (this is the default mode, disabling
this option uses the "17/23" format). An option also exists for
using dedicated unicode characters for specific fractions (where
a unicode character exists), e.g. ½ or ¾

Ultimately this allows for creation of scalebars with fractional
representations of distances, e.g. 0 ----- ½ ----- 1 km
(instead of 0 ------ 0.5 ------ 1km)

Fixes #21289

Sponsored by SLYR
2020-03-23 14:24:37 +10:00
Nyall Dawson
1887846a5c [FEATURE][layouts] Add "hollow" scalebar style
This matches the "hollow" scalebar style from ArcMap, and is a style
used in South African mapping standards

Fixes #20390

Sponsored by SLYR
2020-03-23 03:08:50 +10:00
Nyall Dawson
e7cc8307e4 [FEATURE][layouts] Add "Stepped Line" scalebar style
Designed to match the appearance and behavior of the ArcMap equivalent,
this was a scalebar format which was previously impossible to replicate
in QGIS.

Also fixes #26589

Sponsored by SLYR
2020-03-23 03:08:50 +10:00
Nyall Dawson
b45203a6c4 Make a proper registry for scalebar renderers 2020-03-21 03:45:24 +10:00