57838 Commits

Author SHA1 Message Date
Nyall Dawson
741c051321 Spelling 2019-10-02 21:37:52 +10:00
Nyall Dawson
9b07075fae Add a switch to QgsTessellator to avoid z handling and fallback to a
purely 2d tesselation

Optimises tessellation when only a 2d tessellation is required by
skipping unnecessary/unwanted calculations
2019-10-02 21:37:52 +10:00
Nyall Dawson
8adc498421 Heavily optimised QgsTessellator::_minimum_distance_between_coordinates check 2019-10-02 21:37:52 +10:00
Nyall Dawson
70ee5a7c00 Optimise QgsTriangle constructors 2019-10-02 21:37:52 +10:00
Nyall Dawson
1c1a1a2d90 Reserve data size 2019-10-02 21:37:52 +10:00
Nyall Dawson
b7062b54f6 More optimisations to tesselation conversion to tri polys
Use an unordered set for previously encountered points, avoids expensive
loop through existing points to determine point uniqueness
2019-10-02 21:37:52 +10:00
Nyall Dawson
a735bdc554 Fix warnings 2019-10-02 21:37:52 +10:00
Nyall Dawson
a9228f576d Spelling and build warning 2019-10-02 21:37:52 +10:00
Nyall Dawson
2d6f4d2a20 Optimise QgsLineString::transform 2019-10-02 21:37:52 +10:00
Nyall Dawson
577e1e962d Huge speed up to QgsTessellator
Don't construct Points just for comparison to an existing x/y value
2019-10-02 21:37:52 +10:00
Nyall Dawson
efcc9c5240 Some optimisations for QgsTessellator::_check_intersecting_rings to avoid unecessary cloning and repeated geos conversions 2019-10-02 21:37:52 +10:00
Nyall Dawson
04ca01a795 Because QgsTessellator ONLY works with QgsPolygon geometry inputs,
we can safely assume all rings are QgsLineStrings (not the abstract
QgsCurve type) and accordingly can use optimised methods for retrieving
points from the rings
2019-10-02 21:37:52 +10:00
Nyall Dawson
8ee1c20bb2 [tesselator] Allow internal scaling of coordinates by input coordinate
bounds to avoid numerical instability with close coordinates (e.g. calculating
tesselation of geometries in geographic CRS)
2019-10-02 21:37:52 +10:00
Alessandro Pasotti
70d23e3137
Merge pull request #32018 from elpaso/bugfix-gh31961-snapping-units-from-crs
Update snapping GUI units when canvas CRS changes
2019-10-02 13:36:34 +02:00
Harrissou Sant-anna
697b65075d Add help button to the "Adjust scaling range" dialog 2019-10-02 08:15:54 +10:00
Giovanni Manghi
c7e4130140 make the A_SRS parameter optional 2019-10-02 08:11:15 +10:00
nirvn
e37efdf89e [symbology] Fix clipped rotated marker when rendering using cache
(fixes #32059)
2019-10-01 16:41:23 +07:00
Nyall Dawson
3a6cc5c2ca Add method to return weighted point inside triangle 2019-10-01 04:05:13 +10:00
Nyall Dawson
975eedc146 Add method to calculate the area of a triangle 2019-10-01 04:05:13 +10:00
Nyall Dawson
e5e3fe473e [processing] Ensure all objects used by the model are correctly imported
Fixes #32004
2019-10-01 04:04:45 +10:00
nirvn
63670818e6 [decorations] Fix center alignmed decoration can't be moved leftwards 2019-09-30 17:51:18 +07:00
nirvn
3651bf2894 [decorations] Fix missing top/bottom center alignment for north arrow 2019-09-30 17:51:18 +07:00
nirvn
5d763c3d80 [decorations] Fix missing top/bottom center alignment for scale bar 2019-09-30 17:51:18 +07:00
Sandro Santilli
3990a8b62a
Do not assume PostGIS 2.0+ has raster (#32064)
People installing PostGIS via scripts do not necessarely install
raster support, even after PostGIS 2.0.
Starting with PostGIS 3.0 the raster support is not enforced as
active even when installing via extension.

This change detects raster support by the presence of a "raster"
named custom type.
2019-09-30 12:18:48 +02:00
Alessandro Pasotti
cda7ecca42
Merge pull request #32062 from elpaso/bugfix-gh32050-pg-storage-intially-empty-list
Fix PG project storage initially empty list
2019-09-30 11:24:33 +02:00
nirvn
b5524eebc6 [quick] Insure project background color is respected in map settings 2019-09-30 16:18:16 +07:00
Alessandro Pasotti
fecbd08319 Revert unrelated word-wrap changes 2019-09-30 09:43:11 +02:00
Alessandro Pasotti
10d589fedd Fix PG project storage initially empty list
Fixes #32050
2019-09-30 09:39:27 +02:00
Nyall Dawson
196e15a0ff [processing] Avoid confusing use of expression parameter type in
Random Points in Polygon algorithm

Instead, use a standard numeric parameter which accepts data-defined
expression values

Fixes #27640
2019-09-30 16:58:15 +10:00
Nyall Dawson
a49edf1f25 [processing] Make minimum distance between points in "Random Points in polygon"
algorithm optional

And don't do any unnecessary index work when it's not set. Shaves roughly 1/3rd
off the time of algorithm execution.
2019-09-30 16:58:15 +10:00
Andrea Giudiceandrea
7903889f54 Modeler: Set default action to Export as Script Algorithm
otherwise the button tooltip is not shown
2019-09-30 09:48:30 +10:00
Nyall Dawson
86c83537f9 [layouts] Update map settings variables in UI when map extent/rotation changes
Fixes #24136
2019-09-28 08:40:41 +10:00
Nyall Dawson
1afdd935cf [layouts] Fix layout variables set programmatically do not show in GUI
Fixes #28837
2019-09-28 08:40:41 +10:00
Nyall Dawson
2b31e03ad0 [layouts] Ensure variable panels are updated when layout or atlas
properties change

Fixes #26402
2019-09-28 08:40:41 +10:00
Alessandro Pasotti
860d0201ef
Merge pull request #32026 from elpaso/rastercalculator-multiple-bugs-and-new-operators
[needs-docs] Fix multiple raster calc issues (+ new operators)
2019-09-27 19:18:20 +02:00
nirvn
aef6cd417b [locator] Fix crash when all layer features locator searching against an invalid layer 2019-09-27 18:22:29 +07:00
Alessandro Pasotti
e59c1134d7 Code layout 2019-09-27 11:48:06 +02:00
Denis Rouzaud
abb08c2988
[locator] allow to trigger locator search from the API (#32017) 2019-09-27 09:58:47 +02:00
Denis Rouzaud
c88e82af1a
rename QgsLayerTreeRegistryBridge.InsertionPoint.parent to group (#32031)
because I find it confusing to do insertionPoint.parent.insertLayer
insertionPoint.group.insertLayer
2019-09-27 09:58:27 +02:00
Harrissou Sant-anna
f75a0cc4da Various fixes on date functions help
including replacement of todate and tointerval, use of third person
conjugation and addition/fix of examples
2019-09-27 17:44:11 +10:00
Alessandro Pasotti
33fe400abf
Update tests/src/analysis/testqgsrastercalculator.cpp
Co-Authored-By: Nyall Dawson <nyall.dawson@gmail.com>
2019-09-27 08:56:07 +02:00
Alessandro Pasotti
36bfb04add
Update src/analysis/raster/qgsrastermatrix.cpp
Co-Authored-By: Nyall Dawson <nyall.dawson@gmail.com>
2019-09-27 08:55:59 +02:00
Nyall Dawson
45e847ef69 [layouts][needs-docs] Move page background setting to a per-page option
The UI for this setting was sitting under the page properties panel,
which led users to believe it was a per-page setting (rather than
applying to ALL pages in the layout).

Instead, move this property to sit within individual layout item pages
so that the behavior matches what the UI suggests.

Fixes #25695
2019-09-27 15:17:36 +10:00
Nyall Dawson
e534463719 Readd accidentally removed Page Properties action 2019-09-27 11:35:13 +10:00
Nyall Dawson
f5c21a0fbd Optimize QgsContrastEnhancementFunction
Allow some methods to be inlined, and precalculate maximum/minimum values
possible instead of recalculating them for every pixel
2019-09-27 08:21:26 +10:00
Alessandro Pasotti
d730c97f46 Fix multiple raster calc issues
Fixes #32023 Raster calculator change sign does not work when OpenCL is on
Fixes #32025 QGIS Raster Calculator outputs nodata only rasters

Bonus: three new operators with full test coverage
- ABS
- MIN
- MAX
2019-09-26 18:26:25 +02:00
Nyall Dawson
f32d6fdcf2 [processing] Highlight row_number variable in batch expression editor 2019-09-26 20:46:38 +10:00
Nyall Dawson
e6ecfdd39b [layouts] Prevent removal of the last remaining page in a layout 2019-09-26 20:43:21 +10:00
Nyall Dawson
b784d69828 [layouts] Fix crash when exporting layout with no pages 2019-09-26 20:43:21 +10:00
Alessandro Pasotti
880de7f364 Update snapping GUI units when canvas CRS changes
Fixes #31961
2019-09-26 12:16:44 +02:00