124 Commits

Author SHA1 Message Date
Juergen E. Fischer
b81d306047 spelling fixes (closes #32408) 2019-10-26 10:50:30 +10:00
Bas Couwenberg
2628c480c5 Don't include revision in sources.
Prevent changes to files that weren't changed between releases.
This eases review of the changes between releases significantly.
2019-05-17 16:47:47 +02:00
Nyall Dawson
85efc77bb4 Fix inefficient calls to QgsFeature.attributes()[idx]
Replace with just f[idx]. Calling QgsFeature.attributes()
allocates a list of all attributes, which is inefficient
when only a single attribute value is needed.
2018-10-31 08:42:51 +10:00
Nyall Dawson
16ac437780 [processing] Fix bar and box plot exception when category field has NULL values 2018-06-20 08:07:23 +10:00
Alexander Bruy
23a5dd3197 [processing] fix file permissions 2018-02-06 19:25:48 +02:00
Alexander Bruy
3d4a59bb8b [processing] cleanup files from unused code and remove some files 2017-11-28 12:27:45 +02:00
Nyall Dawson
0dd434c183 [processing] Port mean coordinates to c++
And remove final use of inefficient vector.extractPoints function
2017-09-23 09:25:18 +10:00
Nyall Dawson
10d6ef06e8 Replace more duplicate code with QgsProcessingUtils.combineFields 2017-09-23 08:41:54 +10:00
Nyall Dawson
a191c77bcb Remove duplicate testForUniqueness method (replaced with QgsProcessingUtils.combineFields) 2017-09-23 08:37:35 +10:00
Nyall Dawson
21f92a6fb2 Port line intersection and split with lines to c++ 2017-09-22 15:19:32 +10:00
Nyall Dawson
c41dca937c Port processing combineFields to c++ 2017-09-22 15:19:32 +10:00
Nyall Dawson
a9f4540081 Remove 'precision' option from spatial relation processing algs
Rationale:
- the correct use for this option is unclear, and users are
mistakenly using it as a 'tolerance' option
- it's very likely to generate invalid geometries as a result
of the snapping, causing unreliable results

Given these substantial issues, it's safer to remove this
option and require that users who need the snap to grid
precision change explicitly do this via an extra model
step before running the algorithm.
2017-09-08 16:48:59 +10:00
Nyall Dawson
e33647dc5a Move OGR processing provider specific methods to GdalUtils 2017-08-14 04:56:24 +10:00
Nyall Dawson
ab079f9d92 ogrConnectionString reuses existing context 2017-08-14 04:56:24 +10:00
Mario Baranzini
78af413dcc Remove python future compatibility layer 2017-08-07 10:27:15 +02:00
Nyall Dawson
ecaee1a3f2 QgsGeometry::vertexAt now returns QgsPoint, not QgsPointXY
Since it's easy to convert from a QgsPoint to a QgsPointXY,
but impossible to recover the Z/M values lost by only
returning a QgsPointXY.
2017-07-28 11:48:50 +10:00
Nyall Dawson
18dd09762b Remove vector.simpleMeasure
It's quite a confusing function - instead use optimised versions
of the measurement calculations in its place
2017-07-27 10:46:53 +10:00
Nyall Dawson
6be4875a82 Restore symmetrical difference alg 2017-06-22 18:21:16 +10:00
Nyall Dawson
ea2e477d91 Fix failing tests, temporarily disable some processing tests during
refactoring
2017-06-06 07:41:20 +10:00
Nyall Dawson
f9887aabf5 [processing] Remove more UseSelectionIfPresent use 2017-06-06 07:41:20 +10:00
Nyall Dawson
06c4dea7ff [processing] Remove vector.createVectorWriter
Use QgsProcessingUtils.createFeatureSink instead
2017-05-07 08:02:54 +10:00
Nyall Dawson
a8a3cc82ed [processing] Port vector.createVectorWriter to c++
This implements an improved version of vector.createVectorWriter
in QgsProcessingUtils. The improved version relies on the
core class QgsVectorLayerImport to create empty layers,
which:
- reduces duplicate code and reuses the mature QgsVectorLayerImport
routines
- avoids manual conversion of field types to destination provider
field types
- potentially allows any writable provider to be used as a feature
sink for algorithms (e.g. output direct to MSSQL/Oracle/db2). This
should work now - it just needs exposing via UI.
2017-05-07 08:02:53 +10:00
Nyall Dawson
b5ae888b60 Merge pull request #4478 from nyalldawson/layer_store
Split off map layer storage handling from QgsProject to QgsMapLayerStore
2017-05-06 13:00:05 +10:00
Nyall Dawson
f81971daa4 Fix failing tests 2017-05-03 07:09:44 +10:00
Nyall Dawson
15de36ab26 [processing] Always require real QgsFields objects in getVectorWriter,
don't allow arrays of fields as inputs
2017-05-03 06:26:12 +10:00
Nyall Dawson
ee1236f067 [processing] Remove unused options argument from (create/get)VectorWriter 2017-05-03 06:25:30 +10:00
Nyall Dawson
877775d2c0 Remove a bunch of unneeded imports 2017-05-02 14:47:58 +10:00
Nyall Dawson
49c688bbe4 Fix use of QgsProcessingUtils.mapLayerFromString 2017-05-02 13:40:49 +10:00
Nyall Dawson
df1ead5ed4 [processing] Remove vector.spatialindex()
Use QgsProcessingUtils.createSpatialIndex() instead.
2017-05-02 13:39:36 +10:00
Nyall Dawson
bde1bf457b [processing] Remove unused vector.duplicateInMemory() function 2017-05-02 13:29:42 +10:00
Nyall Dawson
7eb7a7aa01 [processing] Remove vector.bufferedBoundingBox()
Use QgsRectangle.grow() instead
2017-05-02 13:27:01 +10:00
Nyall Dawson
b1eecfdba4 Fix resolving memory layers when multiple memory layers are used in model 2017-05-02 12:45:54 +10:00
Nyall Dawson
f84d703234 Add method QgsProcessingUtils::mapLayerFromString
Algorithms and other processing code should use this method
(instead of dataobjects.getLayerFromString) to
retrieve layers from a string, as it considers the processing
context and allows resolving strings to temporarily stored layers.

This permits processing models to function correctly when
intermediate results are stored as memory layers. Subsequent
model algorithms can then access these temporary layers as inputs.
All temporary layers will be removed when the context object
is destroyed after the model algorithm is run.
2017-05-02 12:33:04 +10:00
Nyall Dawson
0b0ccc9e9d Rename QgsVectorLayer::selectedFeaturesIterator to getSelectedFeatures
It's more in line with QgsVectorLayer::getFeatures, hence a more
discoverable API
2017-04-27 11:16:10 +10:00
Nyall Dawson
fd2c18ee16 Refactor processing writer to use QgsFeatureSink, and to store
temporary output layers in the provided processing context

Should fix loss of intermediate memory layers when running
a multi-step model
2017-04-26 17:38:40 +10:00
Nyall Dawson
1394c28d13 [processing] Move some log handling to c++ class 2017-04-26 13:56:29 +10:00
Nyall Dawson
f247a7cda3 Add c++ optimised uniqueValues method which respects processing context
Remove processing vector.uniqueValues/vector.getUniqueValues
and port usage to c++ method

Should be much faster than the python method, as the c++ method takes
advantage of handing off the unique values calculation to the
provider source whenever possible
2017-04-26 12:53:35 +10:00
Nyall Dawson
b067bd786a Rename UseSelection -> UseSelectionIfPresent, clarify docs 2017-04-26 12:53:35 +10:00
Nyall Dawson
427c3b1684 Remove vector.features
Use QgsProcessingUtils.getFeatures instead
2017-04-26 12:53:35 +10:00
Nyall Dawson
6397386fda Remove len method from vector.features
Use QgsProcessingUtils::featureCount instead
2017-04-26 12:53:35 +10:00
Nyall Dawson
8cf1617f5d Use context to control vector.features() 2017-04-26 12:53:35 +10:00
Nyall Dawson
3f137e123d Add context argument to other vector methods 2017-04-26 12:53:35 +10:00
Nyall Dawson
adc7cf0ec2 Add context argument to vector.features 2017-04-26 12:53:35 +10:00
Nyall Dawson
ee777447a9 [processing] Remove special handling for invalid geometries
Instead rely on QgsFeatureRequest method. There's a temporary
loss of the feedback on encountering an invalid geometry
when abort on invalid is set, but that will be resurrected
when all of vector.features is moved to c++
2017-04-25 16:16:17 +10:00
Nyall Dawson
cc5b9bfe17 More QgsDistanceArea API cleanups and simplification
- setEllipsoidalMode() was removed. Ellipsoidal calculations are
now enabled whenever a valid ellipsoid() has been set. Set the
ellipsoid to 'NONE' to disable ellipsoidal calculations.

- ellipsoidalEnabled() was removed. Ellipsoidal calculations
are now enabled whenever a valid ellipsoid() is set. Check
willUseEllipsoid() to determine whether ellipsoidal
calculations will be performed.

- sourceCrs() and setSourceCrs() now always take and return
QgsCoordinateReferenceSystem objects. All string/ID based CRS
methods were removed.

- geographic() was removed. This was only used internally
in one place, so was replaced with sourceCrs().isGeographic() instead.

- some largely overlapping measurement functions were consolidated
2017-04-18 08:14:16 +10:00
Nyall Dawson
377b181c4e Port more processing dataobjects methods to c++
Also
- simplify and add tests
- remove large memory leak (persistant store of all non-project layers)
- remove broken support for direct loading postgres/virtual layers
by string (Python version was very broken and would never match
a postgres/virtual layer)
2017-04-05 19:50:46 +10:00
rldhont
eb2231925f [BUGFIX][Processing] Vector tools -- add next methods for features iterator 2017-03-15 21:01:21 +01:00
Juergen E. Fischer
ecc5bb508e pep8/pyflakes3 cleanups 2017-03-04 02:38:15 +01:00
Juergen E. Fischer
a10c890383 More QgsSettings updates:
* revives WMS
* QgsSettings::clear() added
* section added to QgsSettings::contains()
* type parameter added to sip binding of QgsSettings.value()
* TODO: customization & evis
2017-03-04 02:37:59 +01:00
Juergen E. Fischer
fe75e1f2a6 processing: fix warning 2017-02-11 21:44:32 +01:00