7422 Commits

Author SHA1 Message Date
Nyall Dawson
9c55b8bd6f Add Python repr for QgsProviderRegistry::ProviderCandidateDetails 2020-11-07 07:57:00 +10:00
Nyall Dawson
51762dd0ef Add API to QgsProviderMetadata to determine valid layer types
which the provider can use to open a specified URI
2020-11-07 03:22:22 +10:00
Nyall Dawson
8254b7dd1f Add capabilities flags for QgsProviderMetadata
So that callers can determine which functionality in the metadata
is implemented for a particular object
2020-11-07 03:22:22 +10:00
signedav
9e5a67f9e7 sipified qgsmaplayer 2020-11-06 17:35:04 +01:00
Alessandro Pasotti
3e398e2ab4
Merge pull request #39577 from elpaso/hidden-layers
Hidden layers
2020-11-05 16:13:10 +01:00
Alessandro Pasotti
26a9cdf5fd Hidden layers -> Private layers 2020-11-05 12:59:27 +01:00
Alessandro Pasotti
414d938117 Fix raster paletted and pseudocolor various issues 2020-11-05 12:11:24 +01:00
Nyall Dawson
9ee235cfbd Spelling 2020-11-05 20:16:48 +10:00
Nyall Dawson
787230e460 Spelling 2020-11-05 20:16:48 +10:00
Nyall Dawson
d51e752e04 Add utility function to extract wildcards from a filter string 2020-11-05 20:16:48 +10:00
Nyall Dawson
04dc5f5e56 Add API for providers to test whether a particular URI should be
blocklisted and hidden from the QGIS interface, e.g. it is an internal
detail only (or sidecar file) and shouldn't be shown in things like the
browser panel

And adds blocklists for .aux.xml, .shp.xml and .tif.xml files for
the ogr/gdal providers
2020-11-05 20:16:48 +10:00
Nyall Dawson
7717a20af7 Mark some QgsProviderMetadata methods as const 2020-11-05 20:16:48 +10:00
Nyall Dawson
8abe4a1ec6 Refine API for QgsProviderRegistry tests for preferred provider
for a URI to better handle ties, add direct method to determine
whether a particular provider should defer handling of a certain
URI to another (better equipped) provider
2020-11-05 20:16:48 +10:00
Peter Petrik
3dec432cb6 [pointclouds] add basic structure for PDAL layer 2020-11-04 21:56:09 +01:00
Nyall Dawson
8b7fe3174b Add since 2020-11-04 18:49:11 +10:00
Nyall Dawson
0ebe788877 Add API for providers to indicate their priority in opening a specified
URI

And add new method to QgsProviderRegistry to select the preferred
provider for opening a URI based on this
2020-11-04 18:49:11 +10:00
Nyall Dawson
4aa1c2f299 Add python repr for QgsProviderMetadata 2020-11-04 18:49:11 +10:00
Nyall Dawson
74722b350c Add utility to determine whether a certain file name matches a given file filter string 2020-11-04 18:49:11 +10:00
Nyall Dawson
4e1df35d0f Forward declare 2020-11-04 18:49:11 +10:00
Nyall Dawson
7771417a2d Improve docs 2020-11-04 18:49:11 +10:00
Nyall Dawson
e59bab7f2e Add QgsProviderRegistry::filePointCloudFilters() for retrieving filter string of all supported point cloud types 2020-11-04 18:49:11 +10:00
Nyall Dawson
6885a1604c Methods in QgsProviderRegistry should not be virtual -- this class
is not designed to be subclassed
2020-11-04 18:49:11 +10:00
Nyall Dawson
f7b0a2d090 Add Point Clouds to QgsProviderMetadata::FilterType 2020-11-04 18:49:11 +10:00
Vincent Cloarec
d45790e05b
Other export mesh algorithms (#39783)
[processing] adds there new export mesh layer to vector layer algorithms :
- export faces
- export edges (1D mesh)
- export on grid
2020-11-04 06:57:30 +01: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
1acfe1fbe6 Add group and description to QgsGeocoderResult, link in to locator,
and populate group in Google Maps geocoding results
2020-11-03 12:11:56 +10:00
Nyall Dawson
cbaeb99a72 Add optional viewport property for geocoder results
Allows specifying an optional recommended viewport bounds for
displaying the geocode result (e.g. the canvas extent to zoom
to for showing the results)
2020-11-03 12:11:56 +10:00
Nyall Dawson
e70caeb3e1 Add getter/setter for api key, region 2020-11-03 12:11:56 +10: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
ee241edb87 completely hide parameter type definition from SIP 2020-11-02 09:50:05 +02:00
Alexander Bruy
5a155f7c23 make QgsProcessingParameterDxfLayers public 2020-11-02 09:49:05 +02:00
Alexander Bruy
6f10e65120 accept layer list and individual layers as dxf inputs 2020-11-02 09:47:29 +02: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
Alexander Bruy
2f9236b254 remove from SIP some parameter type definitions 2020-11-02 07:49:04 +10:00
Alexander Bruy
5271ca26f5 make QgsProcessingParameterVectorTileWriterLayers public
hide parameter types definitions for TIN and vector tile parameters from
SIPP
2020-11-02 07:49:04 +10:00
Nyall Dawson
d0ea8faf3c Add transform context to QgsLocatorContext
Allows locators to correctly perform transformations during their
result fetching/handling
2020-10-30 14:31:54 +10:00
Nyall Dawson
4f6f163ead Move geocoder classes to core 2020-10-30 14:31:04 +10:00
tschmetzer
df0950c6e6
Rename variables for a more intuitive documentation 2020-10-30 09:13:26 +10:00
Nyall Dawson
09e87b8394 Remove non-functional loadDefaultStyle from QgsPointCloudLayer
We should use the base class version for point cloud layers
2020-10-27 14:57:06 +10:00
Nyall Dawson
56f5010947 Show information in point cloud layer properties 2020-10-27 05:29:14 +10:00
Nyall Dawson
23dfbf8e09 Make setting point cloud layer data source follow expected behavior
for map layers

Will make it possible to repair point cloud layer sources
2020-10-27 05:29:14 +10:00
Peter Petrik
29113a89c1 fix some checks and building 2020-10-27 05:29:14 +10:00
Nyall Dawson
d7e8c6c8b8 QgsMapLayerRenderer subclasses aren't exposed to python 2020-10-27 05:29:14 +10:00
Nyall Dawson
4e94abc31f Rename QgsPointCloudRenderer to QgsPointCloudLayerRenderer
This follow the pattern of QgsVectorLayerRenderer, QgsRasterLayerRenderer,
etc and disambiguates the layer renderer from the 2d renderer
itself.
2020-10-27 05:29:14 +10:00
Nyall Dawson
b78583e940 Remove write/readXml from QgsPointCloudRenderer -- these don't belong in a QgsMapLayerRenderer subclass 2020-10-27 05:29:14 +10:00
Nyall Dawson
40ff7127d0 Mark QgsPointCloudRendererConfig as private for now 2020-10-27 05:29:14 +10:00
Nyall Dawson
5a714372e3 Minor api cleanups 2020-10-27 05:29:14 +10:00
Peter Petrik
8ea34de8a2 restore accidentally deleted files 2020-10-27 05:29:14 +10:00
Peter Petrik
8536c564fb add ept provider 2020-10-27 05:29:14 +10:00