295 Commits

Author SHA1 Message Date
Nyall Dawson
7fba697bf3 [FEATURE] New "Merged feature" renderer for polygon and line layers
This renderer merges (or unions/dissolves) the line or polygon features
from a layer prior to rendering them. It's useful for rendering
a polygon layer with overlapping features as one single "coverage" feature,
or a line layer consisting of many smaller component line features
using a regularly spaced marker line or similar.

Internally, this just moves the guts of the existing inverted polygons
renderer to a new base class, as that renderer already had an option
to merge features prior to rendering. Basically it just exposes a new
renderer to users which is the inverted polygon renderer without
the inversion step!
2021-01-04 13:52:18 +10:00
Nyall Dawson
a9c80e5740 Code shuffle
Move vector, project and network related core .cpp/.h files into
dedicated subdirectories.

An attempt to organise src/core better to make things easier to find.
2020-12-29 11:38:11 +10:00
Nyall Dawson
39560eaab2 Add interface class for objects which can generate a feature renderer for vector layers 2020-12-28 04:21:04 +10:00
Nyall Dawson
d6fa53310b Start on QgsArcGisPortalUtils 2020-12-22 04:01:32 +10:00
Nyall Dawson
8d45910535 Move QgsArcGisRestUtils to core, cleanup API, add docs and selectively
expose to Python
2020-12-18 18:14:49 +10:00
Nyall Dawson
3fec67ac2c Add QgsColorRampLegendNodeSettings class 2020-12-18 12:03:26 +10:00
Nyall Dawson
869b24ea92 Add new QgsColorRampLegendNode class for rendering a color ramp item as a legend node 2020-12-16 18:46:53 +10:00
nirvn
ebc2695dc1 [FEATURE][geocoder] Add a nominatim API geocoder 2020-12-15 13:47:43 +07:00
Nyall Dawson
def587fa77 [pointclouds] Add an extent only 2d renderer for point clouds
Useful when you just want an overview of the bounds of the layer in a
2d map. Also potentially usable as a temporary renderer for las/laz
files while we build the indexed representation of the file in the
background.
2020-12-04 17:44:23 +10:00
Nyall Dawson
666479494b [pointclouds] Add a classified 2d renderer for point clouds
Allows styling point cloud layers by a classification attribute
2020-12-03 07:23:44 +01:00
Nyall Dawson
af280eb124 Move old dummy point cloud renderer code to proper QgsPointCloudAttributeByRampRenderer class
And remove duplicate non-functional symbology tab in point cloud layer properties
2020-12-02 15:54:24 +10:00
Nyall Dawson
0c7df50126 Add framework for calculating the overall elevation/z range of a QgsProject 2020-11-28 16:45:54 +10:00
Nyall Dawson
2632627d39 Add point cloud implementation of QgsMapLayerElevationProperties 2020-11-28 16:45:54 +10:00
Nyall Dawson
7c964f1d41 Add base class for QgsMapLayerElevationProperties
Base class for storage of map layer elevation properties.
2020-11-28 16:45:54 +10:00
Nyall Dawson
3ca572c0e3 2D RGB Renderer for point clouds 2020-11-13 02:59:05 +10:00
Nyall Dawson
a6d61c000a Start on registry for 2d point cloud renderers 2020-11-13 02:59:05 +10:00
Nyall Dawson
8bb7edbbc6 Expose QgsPointCloudBlock to Python 2020-11-13 02:59:05 +10:00
Nyall Dawson
5924ff7cf5 Move guts of qgspointcloudrenderer.* to qgspointcloudlayerrenderer.* 2020-11-13 02:59:05 +10:00
Nyall Dawson
d5ef807ecd Add some more useful methods to QgsPointCloudAttribute 2020-11-10 02:17:10 +10:00
nirvn
dcc53852c4 [temporal] Update the identify tool to take temporal range context into account 2020-11-09 13:10:55 +07:00
Vincent Cloarec
1fbba79a0f
Mesh export processes, first part : infrastructure and export vertices (#39664)
[processing] Infrastructure for QgsMeshLayer to add processing algorithms, dataset group paramater and dataset time parameter to allow the user to easily choose a dataset.
2020-11-03 06:05:28 +01:00
Nyall Dawson
98d09715a4 [api] Add new class QgsGoogleMapsGeocoder
This geocoder utilises the Google Maps "geocoding" API in order to geocode
strings. The Google Maps service is not publicly available, and accordingly
an API key must be first obtained from Google and specified when constructing
this class.

(The user is responsible for managing their Google Maps API key, and ensuring
that the use of this geocoder does not exceed their usage limits! Excessive use
of the Google Maps geocoder API can result in charges being applied to the API key
holder.)

This is raw underlying API only. It is intended to be exposed to QGIS users only
via plugins, and does not result in any out-of-the-box Google Maps functionality.

In order for a plugin to use it, they must do something like this:

    # create a google maps geocoder
    api_key = 'my api key'
    coder = QgsGoogleMapsGeocoder(api_key)

    # add it to the locator bar
    filter = QgsGeocoderLocatorFilter('Google', 'Google', 'addr', coder, iface.mapCanvas())
    iface.registerLocatorFilter(filter)

Mini FAQ:

Q: Why is this being added to core, instead of a plugin?
A: While a plugin would be perfectly acceptable if we are only targetting QGIS desktop,
the intention here is to allow this underlying, low level class to be reused outside
of QGIS desktop (e.g. on QField) with a minimal amount of duplicate effort.
2020-11-03 12:11:56 +10:00
Alexander Bruy
b7997e0fd8 [processing] new parameter for DXF export input layers 2020-11-02 09:47:29 +02:00
Nyall Dawson
9935bbe05e Add adapter class QgsGeocoderLocatorFilter
This class implements the required logic to bridge a
class which implements the QgsGeocoderInterface interface to a
QgsLocatorFilter. It allows easy creation of a locator filter
from a geocoder.

E.g.

    class GoogleGeocoder(QgsGeocoderInterface):
      ... class which implements QgsGeocoderInterface...

    my_google_geocoder = GoogleGeocoder(api_key)
    my_google_locator_filter = QgsGeocoderLocatorFilter('google', 'Google Maps', 'google', my_google_geocoder, iface.mapCanvas())
    iface.registerLocatorFilter(my_google_locator_filter)

Note:

There's an abstract base class QgsAbstractGeocoderLocatorFilter which
lives in core. This base class has the guts of the geocoder to filter
adapter logic, but it does NOT implement the part which actually zooms
the canvas to the geocode results (because it's in core!)

This abstract base class is in place for applications like QField,
where the GUI library and QgsMapCanvas is NOT used. Those applications
can then implement their own concrete class based on QgsAbstractGeocoderLocatorFilter
with the correct logic to zoom their interface to a region. Ultimately,
a single QgsGeocoderInterface could be usable across QGIS desktop, QField,
with almost all logic shared via the common abstract adapter class.
2020-11-02 11:22:48 +10:00
Nyall Dawson
4f6f163ead Move geocoder classes to core 2020-10-30 14:31:04 +10:00
Peter Petrik
b796dbb07b add some basic skelet for point cloud data providers 2020-10-27 05:29:14 +10:00
Peter Petrik
8a42c5759f port the basic renderer from Martin's prototype 2020-10-27 05:29:14 +10:00
Peter Petrik
de6f4d6ad8 hook point cloud layer type to the rest of the code 2020-10-27 05:29:14 +10:00
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