36 Commits

Author SHA1 Message Date
Nyall Dawson
01d34ede9d Sip sync 2017-09-25 17:12:03 +10:00
Nyall Dawson
ea09aa92a3 Remove QgsTransectSample
Because:
- it's unused in master, and is more code to maintain
just for possible use by plugins
- it's unmaintained, and has had no work done (beside compilation
fixes) in the recent past
- there's no unit tests or detailed documentation to show
how the class should be used
2017-09-04 09:05:38 +10:00
Nyall Dawson
eb7ad7aebe Swap final uses of QProgressDialog in analysis lib to QgsFeedback 2017-08-29 21:46:35 +10:00
Nyall Dawson
0227bdc376 Remove QgsGeometryAnalyzer, QgsOverlayAnalyzer, QgsPointSample
These classes are unused in the master QGIS code, and are
unmaintained and with no unit tests or other QA, and
have inflexible API (e.g. always requiring writing outputs
to shapefiles)

They all have equivalent algorithms available via Processing
(where the algorithms are unit tested and maintained). We should
be pushing all QGIS api users to use the Processing algorithms
instead.
2017-08-11 04:48:11 +10:00
Nyall Dawson
3601138d2a Use a feature source instead of vector layer for QgsGeometrySnapper 2017-07-07 09:28:19 +10:00
nirvn
58f6f93cb6 [zonal statistics] add variance statistic 2017-06-29 11:53:04 +07:00
Mathieu Pellerin
a6b14a0b40 [processing] restore zonal statistics (qgis) alg (#4784) 2017-06-27 18:09:44 +07:00
Denis Rouzaud
537ef07c10 sipify analysis vector 2017-06-21 10:27:23 +02:00
Denis Rouzaud
88a6d2ba2f include gdal_version and add private constructor 2017-05-29 13:50:37 +02:00
Etienne Trimaille
9b46d9dd00 sipify 2017-05-29 13:50:37 +02:00
Denis Rouzaud
7b60d89d6c align pointer and reference in sip files batch 2 2017-05-01 20:00:51 +02:00
Etienne Trimaille
bb3a41883d sipify qgsoverlayanalyzer and qgsnewmemorylayer 2017-04-30 23:07:57 +02:00
Nyall Dawson
636e9c5ea3 [FEATURE] Add geometry snapper modes to only snap end points of lines
Allows snapping of end points only, or end point to end point only

Also update processing algorithm to match
2017-03-30 15:52:49 +10:00
Nyall Dawson
ece3991dbe [FEATURE] New class QgsInternalGeometrySnapper
Used for snapping geometries within a set of features to other
features from that same set.

Just like QgsGeometrySnapper, except that where QgsGeometrySnapper
requires a separate reference layer to snap to
QgsInternalGeometrySnapper snaps *within* a single layer. E.g.
allows you to close gaps within that layer.
2017-03-30 13:54:05 +10:00
Alexander Bruy
278913b7ce use QgsRasterBlock instead of GDAL in zonal statistics (addresses #8736)
This should make zonal statistics usable rasters which come from
other providers, e.g. WCS.
2017-01-28 11:12:12 +02:00
Nyall Dawson
02ea2d7703 Fix typos 2016-11-08 09:05:47 +10:00
Nyall Dawson
8acc286b0f [FEATURE] Snap to layer algorithm accepts a mode parameter
With a new option to prefer to snap to closest point on geometry.
The old behaviour was to prefer to snap to nodes, even if a node
was further from the input geometry than a segment. The new option
allows you to snap geometries to the closest point, regardless
of whether it's a node or segment.
2016-11-07 12:20:59 +10:00
Nyall Dawson
c3a978b9da [FEATURE][processing] Snap geometries to layer algorithm
Port the Geometry Snapper plugin across to the analysis lib, and
expose to python bindings

Add a new algorithm which performs the snapping to layers
2016-11-07 12:20:59 +10:00
Nyall Dawson
44289084e9 Optimise passing of variables by ref/value 2016-10-24 10:36:23 +10:00
Nyall Dawson
4b78b1c208 Make all QgsGeometry methods return values, not pointers
Reduces likelihood of crashes and leaks
2016-08-01 22:41:55 +10:00
Nyall Dawson
bd7d913379 Refine QgsFeature geometry getters/setters
All pointer based methods have been removed.

Now we have only:

  void setGeometry( const QgsGeometry& geom )

and

  QgsGeometry geometry() const

Benefits include avoiding a whole lot of tricky pointer lifetime
issues, potential memory leaks, and finally closing #777, which
has survived for over 9 years!...

Impacts on PyQGIS code:
- no more need for the messy
  g = QgsGeometry( feature.geometry() )
  workaround, just use g = feature.geometry() instead
- IMPORTANT: you can no longer test whether a feature has geometry
 using `if f.geometry():`, since QgsFeature::geometry() will
 *always* return an object. Instead, use
 `if not f.geometry().isEmpty():`, or preferably the new method
 `if not f.hasGeometry():`

Fix #777
2016-08-01 16:25:46 +10:00
Nyall Dawson
1a2231f10c Rename QGis class to Qgis, for capitalisation consistency 2016-07-21 22:01:38 +10:00
Juergen E. Fischer
a90be95f7b sip sync 2016-02-14 03:50:49 +01: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
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
Marco Hugentobler
6788fbaa6a Add baseline buffer tolerance and simplification tolerance parameters to transect sample 2015-07-15 10:58:50 +02: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
9ceb5ceab6 sip sync 2014-11-21 01:17:21 +01:00
Juergen E. Fischer
f041072e66 fix some warnings 2014-06-02 21:52:01 +02: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
45ebedf430 sip fixes: networkanalysis is a separate module 2012-09-27 11:18:52 +02:00