130 Commits

Author SHA1 Message Date
Martin Dobias
f6a2a5e744 Clean up QgsRasterBlockFeedback class 2016-09-09 16:02:18 +08:00
Martin Dobias
80f022878f Small code cleanups 2016-09-02 09:41:35 +08:00
Martin Dobias
fdeac8198c Fix incorrect raster reprojection after drawing raster previews
Moved all temporary projector members to a private class,
so even recursive block() calls will not affect each other
(there is no new performance penalty as block() call always
recomputes the temporary control point matrix anyway)
2016-09-01 18:25:01 +08:00
Martin Dobias
6bb291f2d6 Raster projector constructor cleanup
Marked raster interface as uncopiable (it should have always been uncopiable)
2016-09-01 15:38:58 +08:00
Martin Dobias
9db9304627 Raster MTR improvements - part one (PR #3334) 2016-08-02 08:22:29 +02:00
Nyall Dawson
ba26bc887a Remove the broken, unused QgsPseudoColorShader class 2016-07-26 10:11:57 +10:00
Martin Dobias
cb4410f2bc Added "added" note 2016-07-25 01:26:34 +02:00
Martin Dobias
04ffd9ec4f Final fixes for tests 2016-07-25 00:45:20 +02:00
Martin Dobias
b6b5afd885 [FEATURE] Ability to cancel rendering of rasters + WMS/WCS support
The improvement allows immediate cancellation of raster rendering
in progress. Until now, even when map rendering got cancelled
(e.g. by zooming of panning canvas), the GUI got blocked while waiting
for raster layers to finish their rendering (only vector layers have
had support for cancellation). This should allow for much smoother
user experience while browsing maps including rasters.

The cancellation is supported currently by WMS/WMTS and WCS providers.
GDAL provider may also get support thanks to improvements in GDAL 2.

Funded by Land Information New Zealand.
2016-07-24 23:16:33 +02:00
Nyall Dawson
1a2231f10c Rename QGis class to Qgis, for capitalisation consistency 2016-07-21 22:01:38 +10:00
Nyall Dawson
4cfacf14e3 Make API more consistent
- rename methods with XML to Xml, CRS to Crs, WMS to Wms, ID to Id
- rename methods with SRS to Crs
- rename methods with abbreviations like "dest" to "destination"
- rename methods with abbreviations like "src" to "source"
2016-07-21 08:40:50 +10:00
Nyall Dawson
adafeda82a Avoid all use of QgsCoordinateTransform pointers, replace with
copies or references

Makes the code more robust, fixes leaks and avoids potential
null pointer dereferencing
2016-07-16 20:36:45 +10:00
Nyall Dawson
0d84ca74c5 Make QgsMapLayer::metadata() const 2016-07-15 06:07:08 +10:00
Nyall Dawson
0935b58fef Cleanup QgsMapLayer for 3.0
- implement QGIS 3.0 TODOs
- mark methods as const correct
- rename 'the...' parameters to remove 'the'
- mark QgsVectorLayer::getFeatures as const
2016-07-15 06:07:00 +10:00
Nyall Dawson
1bafa80089 Const correctness for numerous data provider methods 2016-07-15 05:57:57 +10:00
Juergen E. Fischer
2eee2e5c9c fix typos and debian/copyright 2016-07-10 14:20:07 +02:00
Martin Dobias
cca79aa2f4 Fix loss of transparency information in style dock (fixes #15229) 2016-07-07 14:01:28 +02:00
Sandro Mani
d984148efe Have QgsRasterDrawer::draw check for interrupted rendering, reduce raster block tile dimensions, to greatly enhance responsiveness when dealing with reprojected raster layers 2016-06-07 07:26:34 +10:00
Sandro Mani
0ac8ce1497 Docstring updates 2016-06-02 13:36:08 +02:00
Sandro Mani
2738c5097e Add provider for ArcGIS Map and Feature REST services 2016-06-02 13:36:08 +02:00
Nyall Dawson
6428f619da Doc, indentation fixes for hillshade renderer 2016-06-01 22:41:27 +10:00
Asger Skovbo Petersen
d47fe0f7b7 Hillshaderenderer: Add 'multidirectional oblique-weighted' rendering option (#3160) 2016-06-01 21:52:33 +10:00
Nathan Woodrow
17b48563a5 [renderer] Live hillshade renderer for raster layers
Thanks to Asger Skovbo Petersen (@AsgerPetersen) for the idea and fixes
Thanks to Nyall for reviews and bug fixes
2016-05-28 21:01:33 +10:00
Nathan Woodrow
76a23e68e8 [python] Add bits() bindings for QgsRasterBlock 2016-05-25 21:10:07 +10:00
Nathan Woodrow
ca914f118e [FEATURE] Add style/history tab to style dock 2016-05-10 10:32:30 +10:00
Piers Titus van der Torren
208a14eb54 Rewrite pseudocolor render code to improve speed
Most of the time was lost in checking the color cache, so that is replaced
by a look up table for the index in the color map.
2016-04-20 18:56:57 +02:00
Nyall Dawson
6df1f6866c [raster] Add note and docs for psuedocolor 'clip' option 2016-04-12 11:08:37 +10:00
Nyall Dawson
5e08626051 Add QgsMapLayer::isSpatial() method
The current approach of testing !vl || vl->geometryType() != NoGeometry
is not intuitive and has been the source of 2 recent bugs.

Replacing these tests with the new isSpatial() function makes it
immediately obvious what is being tested. It also allows for
non-spatial plugin layers to be correctly handled by overriding
this method.
2016-03-16 12:38:16 +11:00
Juergen E. Fischer
a90be95f7b sip sync 2016-02-14 03:50:49 +01:00
Nyall Dawson
c3a57434d9 Fix clazy 'pass small and trivially-copyable type by value' warnings 2016-02-02 19:47:21 +11:00
Nyall Dawson
24d9c65494 Fix more classes which violate the rule-of-three
Also remove some empty destructors
2016-01-26 14:24:45 +11:00
Nyall Dawson
752f6bd150 Fix classes which violate rule of three, by implementing required
copy/= operators or making them private

This revealed (and fixes) some issues, including a potential crash
using server access control (refs #13919), and a potential crash with
diagrams
2016-01-22 18:45:45 +11:00
Nyall Dawson
60816af372 Correctly mark some raster classes copy/assignment as private
As they haven't been properly implemented yet and the classes
violate the rule of three
2016-01-20 17:06:04 +11:00
Radim Blazek
689be029d4 missing sip 2016-01-09 16:33:56 +01:00
Nyall Dawson
881074b194 Boost coverage of SIP bindings
Now all classes and members are either exposed to bindings or marked
as "not available in Python bindings" in the docs.

Drop test thresholds to 0. Now it should be much easier to determine
what missing members have been added which are causing test
failures.
2016-01-05 11:16:15 +11:00
Nyall Dawson
9cc9d424ce Add extra check for deprecations to documentation test
This check tests that if a function has been declared deprecated
with either Q_DECL_DEPRECATED or has a @deprecated Doxygen note
then it MUST have both the Q_DECL_DEPRECATD and @deprecated note.

It's important that both are used, as Q_DECL_DEPRECATED allows
throwing a warning if that method is used in code, while the
@deprecated doxygen note gives an indication to devs/PyQGIS users
of why it's deprecated and what should be used instead.

Ideally we'd also test for SIP /Deprecated/ tags, but I can't
find any reliable way to do this.
2015-12-07 21:55:36 +11:00
Nyall Dawson
cdf21b7c3e Return derived classes from clone() methods, avoids need to
dynamic_cast results
2015-11-12 20:29:06 +11:00
Matthias Kuhn
56ccb2b858 sipClass_Klass is deprecated for a long time: replace with sipType_Klass 2015-11-11 23:22:51 +01:00
Juergen E. Fischer
b5794b2f2d sip coverage fixes:
* make sip coverage test aware that there are less classes where QSci sip
  headers are not available
* exclude properties from members
* fix QgsFeatureIds typedef (fixes missing signal
  QgsVectorLayer.featuresDeleted and others)
* add missing notes for PyNames
* include some missing new methods in bindings
2015-11-08 19:30:39 +00:00
Nyall Dawson
fe3417b5ef Partial revert of 70bff3f
Commit was causing crashes in browser. Refs #13738
2015-11-05 21:23:04 +11:00
Nyall Dawson
f1633a1796 Change all signals to use const refs for non trivial objects 2015-10-26 22:46:25 +11:00
Nyall Dawson
70bff3f6aa Finish flipping a lot of methods to take const references for
non-trivial types
2015-10-26 22:46:14 +11:00
Nyall Dawson
c6df096c38 Followup c49b5b7, more fixes 2015-10-07 18:32:24 +11:00
Nyall Dawson
c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00
Juergen E. Fischer
9752c468c1 indentation update 2015-07-29 11:52:14 +02:00
carolinux
37cd9e7a0d Added doxygen docs 2015-06-24 01:15:42 +02:00
carolinux
45681e6e0a Added setBand capability to qgssinglebandpseudocolorrenderer API 2015-06-23 17:19:58 +02:00
Martin Dobias
40acaa051a Deprecate QgsRasterLayer::setDrawingStyle() (fixes #12635) 2015-06-18 12:47:45 +08:00
Nyall Dawson
559d7bb943 [rastercalc] Rework raster calculator to use QGIS raster classes
...rather than reading input layers directly through GDAL.
Benefits include more robust handling of nodata/data type conversions,
less code duplication, also being able to take advantage of features
in QGIS raster code like handling gain/offset in rasters. (fix #12450)

Also, add a choice of output projection to the raster calculator.
Previously the output CRS would be taken from the first raster, with
no guarantees that the output extent matched the output CRS. This
resulted in empty/misplaced rasters. (fix #3649)
2015-06-10 21:45:37 +10:00
Nyall Dawson
920f2ebe56 Fix bug causing raster blocks to be cleared when reprojecting
If a QgsRasterBlock had no nodata value set, then reprojecting
the raster using QgsRasterProjector would result in the entire
block being set to nodata.
2015-06-09 21:57:08 +10:00