41455 Commits

Author SHA1 Message Date
Nyall Dawson
cea7eb8be5 Merge pull request #5119 from nyalldawson/layout_next3
[layouts] Undo/redo framework
2017-09-10 11:38:59 +10:00
Nyall Dawson
2a88a5a953 Optimise calcuation of disjoint features 2017-09-10 10:59:33 +10:00
Nyall Dawson
6d94e6fc5c Optimise Extract/Select by Location alg
Only create and prepare the GEOS representation for intersection
layer features when we encounter a feature in the target layer
within that feature's bounding box.
2017-09-10 10:54:27 +10:00
Nyall Dawson
6a760ef3df More tests for Extract by Location 2017-09-10 10:50:55 +10:00
Nyall Dawson
e0026609bb Fix missing geometries/attributes in Extract by Location 2017-09-10 10:45:34 +10:00
Alessandro Pasotti
c733b366f1 Use auto for const complex vars in for loop 2017-09-09 12:07:05 +02:00
Alessandro Pasotti
9d7273dadc More Q_FOREACH removal 2017-09-08 22:13:52 +02:00
Martin Dobias
1caaa2e697 Range for loop without detach 2017-09-08 15:12:50 +02:00
Martin Dobias
d568ce336e Replace Q_FOREACH by range for loop 2017-09-08 15:12:50 +02:00
Martin Dobias
31b6b5885f Node tool: give priority to the current layer when selecting vertex 2017-09-08 15:12:50 +02:00
Alessandro Pasotti
8abf6dc43e Update tests for OGR getLayers now returning also the geometry column name 2017-09-08 12:36:42 +02:00
Nyall Dawson
640a27b4ea Drop python Select/Extract by Location algs 2017-09-08 20:34:52 +10:00
Nyall Dawson
f4b9bbd8ab Swap unit tests to use native algorithms 2017-09-08 20:32:12 +10:00
Nyall Dawson
cecdf33614 Native c++ Extract by Location algorithm 2017-09-08 20:20:49 +10:00
Nyall Dawson
f799d3afc8 Move allFeatureIds from QgsVectorLayer to QgsFeatureSource 2017-09-08 20:09:29 +10:00
Richard Duivenvoorde
7a62746297 fix capitalisation 2017-09-08 12:05:48 +02:00
Alexander Bruy
1fb48f456c [processing] fix file filter construction for output files 2017-09-08 11:56:23 +03:00
Alessandro Pasotti
f0e021c2fd Merge pull request #5000 from jgrocha/add-default-layers
[FEATURE][needs-docs] Add XYZ connection to provide default OpenStreetMap tiles
2017-09-08 10:40:45 +02:00
Nyall Dawson
1aa76ac175 Port Select by Location to c++ 2017-09-08 17:40:36 +10:00
Alessandro Pasotti
274cc6c86c Disable SQL filter when a raster is selected 2017-09-08 09:36:00 +02:00
Alessandro Pasotti
7d4c24eea5 Give credits to the original author of the source select
and amend some comments
2017-09-08 09:26:18 +02:00
Juergen E. Fischer
25c27b3c80 avoid leak 2017-09-08 09:03:11 +02:00
Juergen E. Fischer
133d16c532 use SIP_SKIP (followup 5c3a72014) 2017-09-08 09:02:53 +02: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
Alessandro Pasotti
eca6137088 Use the new generic OGR source select class 2017-09-08 08:40:22 +02:00
Alessandro Pasotti
ce3d644e74 Generic implementation of OGR file DB connection 2017-09-08 08:39:28 +02:00
Alessandro Pasotti
1a9fa28b05 New generic file-based DB OGR source select 2017-09-08 08:37:00 +02:00
Alessandro Pasotti
6e34681b73 Use the OGR generic methods 2017-09-08 08:35:46 +02:00
Nyall Dawson
4ca972a2ff Fix stats by categories tests on Travis 2017-09-08 16:35:18 +10:00
Alessandro Pasotti
1b72a0d857 Moved some reusable methods from gpkg to the ogr items class 2017-09-08 08:34:31 +02:00
Nyall Dawson
e9fd409552 Allow multiple primary key fields to be specified for processing tests
`
2017-09-08 16:33:55 +10:00
Alessandro Pasotti
ce54111607 Added add geopackage icon 2017-09-08 08:24:07 +02:00
Alessandro Pasotti
abb99e5fa7 Refactor of QgsGeoPackageConnection to a generic class 2017-09-08 08:23:19 +02:00
lbartoletti
5c3a72014a fix qgsgeometry sip 2017-09-08 08:06:21 +02:00
lbartoletti
629f46d308 add overload methods 2017-09-08 08:06:21 +02:00
lbartoletti
6ae929e9cb initial commit 2017-09-08 08:06:21 +02:00
Larry Shaffer
8770625db2 Fix CMake bundling error on macOS 2017-09-07 20:30:49 -06:00
Nyall Dawson
c750cb2154 Fix existing unit test, add new tests 2017-09-08 09:21:02 +10:00
Nyall Dawson
2612c39578 [processing] A non optional, multiple field input must have at least
one selected field to be considered valid
2017-09-08 09:10:17 +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
Blottiere Paul
20d824413e Merge pull request #5094 from pblottiere/trust2
[FEATURE] Trust project option
2017-09-07 16:21:37 +01:00
Alessandro Pasotti
31b51178b8 Added static QgsLayerItem::iconName(LayerType) for reuse and consistency 2017-09-07 16:12:01 +02:00
Alessandro Pasotti
51abef4d37 Add geometry column name to sublayers result 2017-09-07 15:44:42 +02:00
Blottiere Paul
437aefa32a Move trust checkbox in data sources tab 2017-09-07 09:44:36 +01:00
Blottiere Paul
456ca000a7 Rename methods 2017-09-06 15:22:39 +01:00