18576 Commits

Author SHA1 Message Date
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
Alessandro Pasotti
dec0af6b65 Store unmodified double value in widget items
Also add a custom delegate.

Try to fix #39757
2020-11-03 12:18:15 +01:00
Denis Rouzaud
7d1ca81618
improve geometry equality report in tests (#39772)
from https://github.com/qgis/QGIS/pull/8154/files#diff-dbb55b6871a9157f22dc7a979009676cb03f2fadefc557ad0e66a47c92a93503
2020-11-03 09:30:14 +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
bdce38bc0b drop useless test 2020-11-02 09:47:29 +02:00
Alexander Bruy
6f10e65120 accept layer list and individual layers as dxf inputs 2020-11-02 09:47:29 +02:00
Alexander Bruy
9414e3f54a test for DXF export algorithm 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
nirvn
f36701c4f8 [processing] Fix add (single) row tool button broken 2020-11-02 07:47:39 +10:00
Andrea Giudiceandrea
fa1b704a5c [processing] fix method name in GUI wrapper 2020-11-02 07:44:51 +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
Nyall Dawson
d484beb7f3 Spelling 2020-10-30 09:19:48 +10:00
Nyall Dawson
0725112196 Spelling, since updates 2020-10-30 09:19:48 +10:00
Nyall Dawson
94f3ea0d14 Add interface API for geocoders 2020-10-30 09:19:48 +10:00
tschmetzer
df0950c6e6
Rename variables for a more intuitive documentation 2020-10-30 09:13:26 +10:00
Alessandro Pasotti
884bd9a42e Fix crash on nested dataChanged from set current index
Add new methods and tests, try to make it clear when
a method expects a model index and when it expects
a proxy model index.
2020-10-29 14:31:38 +01:00
Alexander Bruy
554ce82c32 [processing] test for newly added parameter in Clip Raster by Extent
(followup 41dc20c2c1)
2020-10-28 18:35:29 +02:00
Alexander Bruy
41dc20c2c1
Merge pull request #38841 from rldhont/processing-gdal-clipbyextent
[Processing][GDAL] Clip Raster by extent - override CRS
2020-10-28 18:18:14 +02:00
Julien Cabieces
912dd770c0 [processing] Add missing parameter when reading QgsProcessingParameterField from string 2020-10-28 13:39:26 +10:00
Alexander Bruy
bfdb99fe65 [processing] correctly escape parentheses in GDAL command (fix #39525) 2020-10-28 06:07:27 +10:00
rldhont
90e9eda818 Processing - GDAL - Raster clip by extent - override CRS 2020-10-27 14:34:44 +01:00
Will Cohen
8172c5ed9d Revert ordering of PreviewMode's Grayscale/Mono 2020-10-27 16:41:22 +10:00
Will Cohen
da5bc3068c PreviewGrayScale->PreviewModeGrayscale, captions 2020-10-27 16:41:22 +10:00
Will Cohen
ea628e3129 Revert CVD function names to avoid API breakage 2020-10-27 16:41:22 +10:00
Will Cohen
7bd81dfc60 [FEATURE] Improved color vision deficiency sim
This modifies the previous support for grayscale
and LMS-based simulation for protanopia and
deuteranopia, and brings it in line with the
methodology currently used in Chromium and Firefox
(https://bugs.chromium.org/p/chromium/issues/detail?id=1003700,
https://bugzilla.mozilla.org/show_bug.cgi?id=1655053).

QGIS now uses updated grayscale luminance
calculations (renamed to achromatopsia), a
precomputed protanopia matrix (renamed from
protanope), a precomputed deuteranopia matrix
(renamed from deuteranope), and an additional mode
for tritanopia using a similarly precomputed matrix.

This commit addresses issue #29760.
2020-10-27 16:41:22 +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