76 Commits

Author SHA1 Message Date
Nyall Dawson
a665b7d72e Don't crash when using raster calculator with huge raster (refs #13336)
Now we abort and advise the user if insufficient memory is available
to perform the calculation.

At some future stage it would be nice to perform the calculations
in blocks to allow this scenario, but for now it's better not to
crash.
2016-01-27 10:48:12 +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
Juergen E. Fischer
ae52aabd70 more spelling fixes 2016-01-24 20:16:28 +01: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
Juergen E. Fischer
4e1cf3c081 add missing copyright headers 2016-01-08 21:32:11 +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
Juergen E. Fischer
71dc339106 more stl to qt ports and size_t => int fixups 2015-12-26 00:59:09 +01:00
Matthias Kuhn
313c34ce22 [py3] Updates to sip files 2015-11-16 07:42:48 +01:00
Matthias Kuhn
56ccb2b858 sipClass_Klass is deprecated for a long time: replace with sipType_Klass 2015-11-11 23:22:51 +01:00
Nyall Dawson
719ff408a5 Add some missing SIP bindings, comment some classes as not available
in Python
2015-11-10 17:08:27 +11:00
Nyall Dawson
a0542e5d1d Fix sip bindings for interpolation classes
Also missing members declared in interpolation headers
2015-11-10 17:07:42 +11:00
Nyall Dawson
556d87a86c Fix some clang warnings 2015-11-02 18:07:16 +11:00
Nyall Dawson
7842391eba Add some missing consts to operators 2015-10-28 09:47:44 +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
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
Juergen E. Fischer
b165875fa6 spelling fixes 2015-07-26 14:39:30 +02:00
Marco Hugentobler
6788fbaa6a Add baseline buffer tolerance and simplification tolerance parameters to transect sample 2015-07-15 10:58:50 +02:00
Juergen E. Fischer
79d37c1a8b fix windows build (followup 8f2a3ae) 2015-06-30 17:30:25 +02:00
Martin Dobias
11d1ac9540 Try to do automatic choice of the reference layer in GUI (using smallest cell area) 2015-06-29 10:25:47 +08:00
Martin Dobias
fcc0160755 Fix type of CRS WKT (use just QString instead of both QString and QByteArray) 2015-06-29 10:25:47 +08:00
Martin Dobias
06b4ad8512 Allow for custom setting of cell size / grid offset in GUI 2015-06-29 10:25:47 +08:00
Martin Dobias
3d290ef21a Align rasters: configuration of clip extent, reporting of output size 2015-06-29 10:25:47 +08:00
Martin Dobias
b452bc0245 Support reprojection in GUI, added unit tests for reprojection 2015-06-29 10:25:47 +08:00
Martin Dobias
d7a9493445 Add error messages, fix reporting of grid offset 2015-06-29 10:25:46 +08:00
Martin Dobias
515de2879b Added progress reporting 2015-06-29 10:25:46 +08:00
Martin Dobias
d6d2f1a374 Add python bindings for QgsAlignRaster 2015-06-29 10:25:46 +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
e1f7d330c2 [rastercalc] More robust handling of nodata in calculations
Also allow creation of QgsRasterCalcNodes which directly reference
a QgsRasterMatrix for testing.
2015-06-10 21:45:37 +10:00
Nyall Dawson
f42f640d30 [rastercalc] Switch all internal calculations to doubles
...for more accurate calculations (fix #9081)

Also:
- Add test suite for raster calculator
- Fix errors with log/log10 calculation and inputs <= 0
- Fix loss of nodata values in certain circumstances
2015-06-10 21:45:37 +10:00
Nyall Dawson
2863f20d67 Add a const geometry getter to QgsFeature 2015-05-11 19:46:32 +10:00
Nyall Dawson
ee7b4d2539 [FEATURE] Add extra statistics to zonal stats plugin (fix #4430)
Adds median, standard dev, min, max, range, minority, majority
and variety
2015-04-20 18:20:02 +10:00
Juergen E. Fischer
0ccc07af0e raster calculator fixes (fixes #12238)
* GDALGetGeoTransform failures can be ignored (partly reverts 0080f9e)
* handle quoted raster references
* don't complain if the output file is not yet set
2015-02-23 21:48:04 +01:00
Juergen E. Fischer
9ceb5ceab6 sip sync 2014-11-21 01:17:21 +01:00
Juergen E. Fischer
82b6e0342a cosmetic cleanups, typo fixes, formatting 2014-10-21 01:33:20 +02:00
Juergen E. Fischer
45c0be1059 sip: remove enum constants 2014-06-02 21:52:02 +02:00
Juergen E. Fischer
f041072e66 fix some warnings 2014-06-02 21:52:01 +02:00
Juergen E. Fischer
c4c131ef75 sip sync 2014-05-27 23:32:42 +02:00
Nathan Woodrow
0ff49856e6 Create Python package for core, gui, analysis, networkanalysis
Rename sip generated modules to _{name}
2014-05-19 22:26:02 +10:00
Marco Hugentobler
0a78102c36 Fix sip binding for eventLayer function 2014-03-14 17:09:15 +01:00
Juergen E. Fischer
74e7314c36 update sip bindings II 2014-01-27 09:22:53 +01:00
Marco Hugentobler
f351c4f7f8 [FEATURE:] Add point sample class to analysis library 2014-01-23 16:12:26 +01:00
Marco Hugentobler
b086195888 Add qgstransectsample.sip 2014-01-23 16:12:26 +01:00
Juergen E. Fischer
3854086d47 sip update 2013-06-23 16:00:24 +02:00
Juergen E. Fischer
597c402808 also update networkanalysis.sip (following 61e101dd4) 2013-06-11 10:18:04 +02:00
Nathan Woodrow
61e101dd4f Allow keyword args in Python classes. Fix sip headers 2013-06-10 09:22:12 +10:00
Juergen E. Fischer
ac29c5b11f prepare-commit.sh: remove trailing blanks from python files 2013-01-12 23:48:58 +01:00
Juergen E. Fischer
7172347afb sip fixes 2012-09-29 16:20:12 +02:00
Juergen E. Fischer
45ebedf430 sip fixes: networkanalysis is a separate module 2012-09-27 11:18:52 +02:00
Juergen E. Fischer
c918952c74 more sip fixes 2012-09-26 18:46:52 +02:00