53892 Commits

Author SHA1 Message Date
lbartoletti
50c9b2394e [BUGFIX] fixes #20829 Snapping options in meters rounded to integers 2019-02-20 11:02:31 +10:00
Timothé Perez
f071030019 Fix condition to enable pgsql insert optimization
Fixes a condition to enable Postgis provider insert optimization
(by skipping the PK column if its default is a sequence)
The check must ensure that each row value is also not the SQL
default of nextval('seq'::regclass), otherwise the condition will
not be met
2019-02-20 10:59:21 +10:00
lbartoletti
8c18a5c8f9 [FreeBSD] GRASS inverse searching order
+1 with @neteler
"start with searching the newest GRASS GIS version first"
https://github.com/qgis/QGIS/pull/9174#issuecomment-464729754

cc  @rhurlin
2019-02-20 10:28:04 +10:00
Mathieu Pellerin
7599d4f8d5
[expression] Add try() function to provide a way to detect and handle
expressions which can intermittently fail.
2019-02-20 06:27:43 +07:00
Panos Mavrogiorgos
1d8bd004a6 [grass7] Make it easier to subclass "Grass7AlgorithmProvider"
After @Nyalldawson suggestion [1], we've implemented a Processing plugin
that exposes a GRASS Addon [2]. In order to do this we had to subclass
`Grass7AlgorithmProvider` and override `createAlgsList()`.

`createAlgsList()` had to be overriden in order to change the
"description folder" location.

Nyall wrote:

> And if you do it right (and only import existing
> processing grass code, minimising the copy/paste of this code), then
> your provider will automatically inherit any future fixes and
> features added to the main grass provider.

With this commit we convert the `descriptionFolder` to a class attribute
and in this way, subclasses of `Grass7AlgorithmProvider` will no longer
have to override `createAlgsList()` and will be able to continue inheriting
future enhancements.

References:

1. https://lists.osgeo.org/pipermail/qgis-developer/2019-February/056155.html
2. 948820b1c0/estimap_recreation_provider.py (L40-59)
2019-02-20 05:41:47 +10:00
Etienne Trimaille
06fab90981 add some optional flags in make_polygon expression 2019-02-20 05:41:26 +10:00
Nyall Dawson
c8a4dff475 Add maximum search distance parameter to QgsSpatialIndex::nearestNeighbor 2019-02-20 05:40:02 +10:00
Nyall Dawson
67374805cb Mark private dox as private 2019-02-20 05:40:02 +10:00
Nyall Dawson
362ba02ade When a QgsSpatialIndex is storing feature geometry, then
nearestNeighbor search performs an EXACT nearest neighbour search,
instead of just a nearest-neighbour-by-bounding-box search
2019-02-20 05:40:02 +10:00
Nyall Dawson
26555358f9 Add API for QgsSpatialIndex to optionally store feature geometries
This potentially avoids a second expensive feature request after
building a spatial index and later needing to re-request features
which match spatial index search.

It's non-default, as it requires the index to store all feature
geometries, so it's more memory expensive.
2019-02-20 05:40:02 +10:00
Nyall Dawson
68b460277e layer_property expression function should use proper layer metadata
for return values where available

...instead of the older, server-specific properties

This affects:

- layer_property(...,'title')
- layer_property(...,'abstract')
- layer_property(...,'keywords')
- layer_property(...,'attribution')
2019-02-20 05:39:30 +10:00
Nyall Dawson
b06f00d01b Fix dox test 2019-02-20 05:39:04 +10:00
Nyall Dawson
6021683c35 Capitalization 2019-02-20 05:39:04 +10:00
Nyall Dawson
346f33544c [processing] Expose correct expression context in Refactor fields alg 2019-02-20 05:39:04 +10:00
Nyall Dawson
521ebdc973 [processing] Wrappers built off old API can still take advantage of the full widget context 2019-02-20 05:39:04 +10:00
Nyall Dawson
f620adcbeb Capitalization 2019-02-20 05:39:04 +10:00
Nyall Dawson
9df7b2a02c [processing] Correctly expose full expression context to Filter Features algorithm
configuration widget in modeler

Allows filters to be built (in the GUI) using context related variables
and functions such as input parameter values, model variables, etc
2019-02-20 05:39:04 +10:00
Nyall Dawson
69c703141e Auto set algorithm linked to newly created QgsProcessingAlgorithmConfigurationWidget instances 2019-02-20 05:39:04 +10:00
Nyall Dawson
eb335c3973 [processing] Set full context for QgsProcessingAlgorithmConfigurationWidget in modeler config dialogs 2019-02-20 05:39:04 +10:00
Nyall Dawson
24529b1963 [processing] Add API to set contexts for QgsProcessingAlgorithmConfigurationWidgets 2019-02-20 05:39:04 +10:00
Nyall Dawson
892224c62b Minor refactoring 2019-02-20 05:39:04 +10:00
Juergen E. Fischer
fd15c3e5b6 dwg import: handle wrong hatch interpretation (refs #20392) 2019-02-19 19:56:40 +01:00
Juergen E. Fischer
d84c34e0b0 dwg import: support nested blocks (refs #20392) 2019-02-19 19:56:40 +01:00
Juergen E. Fischer
355deb5905 dwg import: fix exception (fixes #21177) 2019-02-19 19:56:40 +01:00
Juergen E. Fischer
b8c727f1d2 dwg import: force polyline and hatch/ring continuity 2019-02-19 19:56:40 +01:00
Juergen E. Fischer
e1562a7f13 dwg import: support dxf encoding (fixes #15999) 2019-02-19 19:56:40 +01:00
Juergen E. Fischer
f12cac7cb4 dwg import: progress display 2019-02-19 19:56:40 +01:00
Juergen E. Fischer
0f6421df5c dwg import: use Q_DECLARE_TR_FUNCTIONS in QgsDwgImporter 2019-02-19 19:56:40 +01:00
Juergen E. Fischer
92e7faab66 dwg/dxf import: fix angle and alignment handing of (m)texts 2019-02-19 19:56:40 +01:00
Juergen E. Fischer
6090a932c2 dwg import: less noisy debugging 2019-02-19 19:56:40 +01:00
Juergen E. Fischer
1a96982d3e dwg import: fix handling of arc and splines in hatches 2019-02-19 19:56:40 +01:00
Juergen E. Fischer
3aa2d9ff9b dwg import: catch spline misinterpretation (fixes #20392) 2019-02-19 19:56:40 +01:00
Juergen E. Fischer
fec20ae0e2 dwg import: less noisy noise reduction 2019-02-19 19:56:40 +01:00
Alessandro Pasotti
d239ea2df9 Fix unique values when generating a set of features 2019-02-19 19:04:48 +01:00
Marco Bernasocchi
0514df7ebc Add safety guard when mDataProvider is not set 2019-02-19 18:45:30 +01:00
Alessandro Pasotti
03cc355f8e Catch exception from script and pipe it into feedback 2019-02-19 16:57:58 +01:00
Alessandro Pasotti
11c9ce0c8d Revert QStringLiteral 2019-02-19 15:40:36 +01:00
Matthias Kuhn
7e008b25df
Update src/providers/ogr/qgsogrprovider.cpp
Co-Authored-By: elpaso <elpaso@itopen.it>
2019-02-19 15:36:39 +01:00
Matthias Kuhn
adba08c8fa
Update src/providers/ogr/qgsogrprovider.cpp
Co-Authored-By: elpaso <elpaso@itopen.it>
2019-02-19 15:33:07 +01:00
Alessandro Pasotti
f454827397 Explain why the workaround for GPKG/SQLite is necessary
I've talked to Even for this one
2019-02-19 15:26:32 +01:00
Alessandro Pasotti
5d7a7ac973 Fix unique values on SQLite (OGR) pk 2019-02-19 14:56:10 +01:00
Alessandro Pasotti
818611cc79 Fix renamed QgsVectorLayerUtils.QgsFeatureData 2019-02-19 14:55:55 +01:00
Alessandro Pasotti
1689c9364b Fix unique values on GPKG pk
Fixes #21311
2019-02-19 14:48:10 +01:00
Alessandro Pasotti
7fa9bc1657 Typo 2019-02-19 14:46:41 +01:00
Matthias Kuhn
79490461dd
Merge pull request #9195 from m-kuhn/fix-help-button-group
Fix link to drag and drop designer help
2019-02-19 14:08:11 +01:00
Mathieu Pellerin
5297d83cb5 [themes] Slightly adjust padding of push buttons to match tool buttons 2019-02-19 18:49:18 +07:00
Alessandro Pasotti
348e6837ac Fix docs for createFeatures 2019-02-19 11:17:48 +01:00
Alessandro Pasotti
490c1fedfb Rename QgsFeaturesData to QgsFeatureData and fix test case 2019-02-19 10:51:53 +01:00
Alessandro Pasotti
ba3d9ed066 Cache unique values when creating features
Fixes #21305 - pasting features is very slow

Aggressively optimize createFeature for speed
and introduces createFeatures for bulk creation.
2019-02-19 10:02:17 +01:00
Alessandro Pasotti
f2e745ebdb Cache unique values in createFeature (~10x faster) 2019-02-19 08:26:54 +01:00