979 Commits

Author SHA1 Message Date
Matthias Kuhn
44c1f7fc3c
chmod -x StatisticsByCateogries.py 2017-09-28 13:22:31 +02:00
Matthias Kuhn
f6479c1f79 [processing] Fields mapper code improvement 2017-09-26 14:29:05 +02:00
Nyall Dawson
f8cf2f4dbe [processing] Fix Refactor Fields rejects valid field configuration input 2017-09-26 13:58:01 +10:00
Alexander Bruy
745111dbdb [processing] enable network analysis tests 2017-09-25 11:20:42 +03:00
Nyall Dawson
1d6e30324f Use correct SRS when building graph 2017-09-24 12:09:38 +10:00
Nyall Dawson
6efcc2fe86 Transparently reproject source points in algs 2017-09-24 12:09:38 +10: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
Matthias Kuhn
b1b21ed25f Merge pull request #5143 from m-kuhn/nulldatasetparams
QgsVectorFilewriter skip default null options
2017-09-20 11:44:57 +02:00
Matthias Kuhn
0ac02497b9
[processing] Make python field calculator support LongLong 2017-09-19 15:01:54 +02:00
Matthias Kuhn
506b35a75d
[processing] Fix type resolving in python field calculator 2017-09-19 15:01:54 +02:00
Mathieu Pellerin
01468d0879 Merge pull request #5204 from nirvn/saveselected_native 2017-09-16 12:17:11 +07:00
Nyall Dawson
085687d8f0 Also update other spatial join alg 2017-09-16 10:21:54 +10:00
Nyall Dawson
ecf7dd5e4f Update class name 2017-09-16 09:59:13 +10:00
arnaud.morvan@camptocamp.com
b08119bc96 [processing] Add ui option useCheckBoxes in ByLocation algorithms 2017-09-16 09:58:35 +10:00
arnaud.morvan@camptocamp.com
53df3699fd [processing] add ui option useCheckBoxes in CheckValidity 2017-09-16 09:57:13 +10:00
nirvn
04ee85f0e8 [processing] native save selected features algorithm 2017-09-15 15:51:30 +07:00
Nyall Dawson
60b56db904 Use CRS when calculating extent during algorithm extection 2017-09-15 08:35:11 +10:00
Nyall Dawson
d96a3f4dd4 Port simplify geometries to c++ 2017-09-14 09:57:15 +10:00
Nyall Dawson
8e8f3edc55 Port merge lines and smooth to c++ 2017-09-14 09:57:15 +10:00
Nyall Dawson
7c5521ecdf Port fix geometries alg to c++ 2017-09-14 09:57:15 +10:00
Nyall Dawson
bf078b1c84 [processing] Fix intersection and union tools don't work with
input layers with Z or M values present

Also ensure that written geometries are always multitype, to
match the created layer geometry type (before the layer was
being created as a multi* layer, but single part geometries
were sometimes created. This causes errors with some data
providers)
2017-09-14 07:35:54 +10:00
Nyall Dawson
be88da8173 [FEATURE][processing] Add 'Join by location (summary)' algorithm
Like the main Join Attributes by Location algorithm, this algorithm
takes two layers and combines the attributes based on a spatial
criteria.

However this algorithm calculates summaries for the attributes for
all matching features, e.g. calculating the mean/min/max/etc.

The list of fields to summaries, and the summaries to
calculate for those, can be selected.
2017-09-13 18:45:56 +10:00
Nyall Dawson
458e994d39 [FEATURE] Reworked processing 'Join by location' alg
Improvements:
- transparently handle different source/join CRS
- added option to create output feature for EVERY joined
feature (i.e. 1 to many type join)
- added option to select joined fields to take
- optimised performance of algorithm

The previous option to create a summary of joined features has been
removed, and will be moved to a separate 'Join by location (summary)'
algorithm.
2017-09-13 08:01:56 +10:00
Nyall Dawson
a650681061 Merge pull request #5131 from nyalldawson/location_algs
Rework Select by Location algorithm
2017-09-11 15:50:43 +10:00
Nyall Dawson
640a27b4ea Drop python Select/Extract by Location algs 2017-09-08 20:34:52 +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
24a4ab7f0d Rework Select by Location algorithm
Changes:

- handle different CRS transparently

- don't build a spatial index on the selection layer. Instead
only use feature requests to fetch features which are within
the desired bounds, and rely on the presence of an appropriate
spatial index at the provider's backend. Otherwise, we force
every user of this algorithm to have a full iteration of the
source table, regardless of how large the table is. That means
that trying to select a set of addresses which fall within
a specific locality from a table which contains the addresses
for a whole state will FORCE every address in the state to
be initially read before any calculation begins. With this
change only those features within the bounding box of the
selected localities will ever be fetched from the provider,
resulting in huge speed improvements for the algorithm.

- use prepared geometries for the spatial relation tests.
This dramatically speeds up the algorithm in the case
where the intersection layer features cover multiple
features from the 'selection' layer.

- Add a 'select within current selection' mode

- Optimise feature requests for efficiency (especially
with respect to the 'disjoint' selection mode)
2017-09-08 16:48:59 +10:00
Nyall Dawson
9a091651bc [FEATURE] Drop 'Frequency analysis' and 'Number of unique values in classes' algs
The functionality of both these algorithms is available in 'stats by
categories'
2017-09-08 08:52:42 +10:00
Nyall Dawson
ea2e537cd7 Make value field in 'Stats by category' optional
If not set, only the feature counts for each category will
be calculated
2017-09-08 08:52:42 +10:00
Nyall Dawson
30c663eaef Fix calculation with null strings 2017-09-08 08:52:42 +10:00
Nyall Dawson
30866190e9 [FEATURE] Allow multiple category fields in 'stats by category' 2017-09-08 08:52:42 +10:00
Nyall Dawson
4e78e034a1 [FEATURE] Improve Stats by Categories algorithm
- allow non spatial inputs
- allow calculation of stats on any field type, with specific
string and datetime stats calculated when field type matches
- output a full set of stats for numeric fields (including median
, quartiles, etc)
- also calculate stats for 'null' category
2017-09-08 08:52:42 +10:00
Nyall Dawson
a55fbd8ef3 [FEATURE] Remove Singleparts to Multiparts algorithm
This algorithm is no longer required - it's been replaced by
the 'Promote to multipart' and 'Collect geometries" algorithms.

Tagged as feature to remember to include in release notes
2017-09-05 19:41:28 +10:00
Alexander Bruy
b5bb7df7eb Merge pull request #5111 from nyalldawson/min_bounding_geom_alg
[FEATURE] New processing algorithm "minimum bounding geometry"
2017-09-05 11:58:15 +03:00
Nyall Dawson
d08398f785 [FEATURE] Drop processing 'Select by Attribute Sum' algorithm
Tagged as feature to be included in release notes.

Because:

- The use case for this algorithm is very unclear for users - the name
does not describe what the algorithm does, and there's no help
documentation available for the algorithm either. Given this I suspect
that the algorithm is not being put into use.

- The algorithm needs enhancement to be more useful. There's no logic
in place which dictates how neighbouring features are chosen to
dissolve into the selected feature (it's effectively random - you're
just as likely to get a huge narrow polygon stretching across a map as
you are a nice compact cluster). To be more useful the algorithm would
need logic to either minimise the area of the dissolved feature, or
minimise the total number of dissolved features, or ... ?
2017-09-05 17:22:11 +10:00
Nyall Dawson
f01ad63bba Rename 'Polygon from layer extent' to 'Extract layer extent'
It's slightly simpler to understand and better reflects
what this alg does
2017-09-04 08:45:10 +10:00
Nyall Dawson
5d504dcafb Unify processing "polygon from layer extent" algorithms
Now that the extra features of the "polygon from vector layer extent"
algorithm are covered by the new "Minimum bounding geometry" algorithm,
we can replace the previous two "polygon from vector extent" and
"polygon from raster extent" algorithms by a single "polygon
from layer extent" algorithm.
2017-09-04 08:42:03 +10:00
Nyall Dawson
95eab5127f Remove redundant algorithms 2017-09-04 08:42:03 +10:00
Nyall Dawson
b6e35428e2 Optimise calculation of envelopes for MinimumBoundingGeometry alg
It's more efficient to calculate these on the fly, rather then
collecting all geometry points and then calculating.
2017-09-04 08:42:03 +10:00
Nyall Dawson
83affdc7f5 [FEATURE] New processing algorithm "minimum bounding geometry"
This algorithm creates geometries which enclose the features
from an input layer.

Numerous enclosing geometry types are supported, including
bounding boxes (envelopes), oriented rectangles, circles and
convex hulls.

Optionally, the features can be grouped by a field. If set,
this causes the output layer to contain one feature per grouped
value with a minimal geometry covering just the features with
matching values.
2017-09-04 08:42:03 +10:00
lbartoletti
e30f7044c9 [FEATURE][Processing] Minimal enclosing circle 2017-09-03 07:37:53 +10:00
Nyall Dawson
247d2657ca Fix invalid regular expression warnings 2017-09-01 09:00:57 +10:00
Nyall Dawson
8dde180f3f Rename parameter for consistency with other algs 2017-08-30 14:42:19 +10:00
Nyall Dawson
43e4ed0b27 Rename Polygon from Layer Extent to Polygon from Vector Extent
Helps clarify that this alg only functions for vector layers
2017-08-30 14:41:24 +10:00
Nyall Dawson
44e7f3371e [FEATURE] New algorithm for creating vector layer from raster layer's extent
Allows creation of a new vector layer with a single feature containing
a raster layer's extent. Previously this was only possible for
vector layers.
2017-08-30 14:40:21 +10:00
Nyall Dawson
184899ec30 Port remaining plotly based algs to new API 2017-08-30 07:28:25 +10:00