54777 Commits

Author SHA1 Message Date
Nyall Dawson
426382c919 [FEATURE] Average line angles for marker and hashed line symbology
Previously, when marker or hash lines were rendered using interval
or center point place placement, the symbol angles were determined
by taking the exact line orientation at the position of the symbol.

This often leads to undesirable rendering effects, where little
jaggies or corners in lines which occur at the position of the
symbol cause the marker or hash line to be oriented at a very
different angle to what the eye expects to see.

With this new option, the angle is instead calculated by averaging
the line over a specified distance either side of the symbol. E.g.
averaging the line angle over 4mm means we take the points along
the line 2mm from either side of the symbol placement, and use these
instead to calculate the line angle for that symbol. This has the
effect of smoothing (or removing) any tiny local deviations from
the overall line direction, resulting in much nicer visual
orientation of marker or hash lines.

Like all symbol settings, the average angle smoothing distance
can be set using mm/pixels/map units/etc, and supports data-defined
values.

Closed rings also correctly consider wrapping around these average
angles from the start/end vertex.

(Sponsored by an anonymous corporate backer)
2019-04-05 12:00:47 +10:00
Nyall Dawson
4d7f0c2f50 More unit tests 2019-04-05 11:33:08 +10:00
Nyall Dawson
af2286323a Correctly handle inverse transforms with reversed axis CRS in proj 6.0 builds
This logic is too complex and fragile -- we should drop support for proj 6.0
as soon as we can, so that we can the inbuilt handling which
is enabled for proj >= 6.1 only.
2019-04-05 11:33:08 +10:00
Nyall Dawson
2e11c3493c Rename variable for clarity 2019-04-05 11:33:08 +10:00
Nyall Dawson
e2396aadf3 Use proj_normalize_for_visualization on proj >= 6.1 2019-04-05 11:33:08 +10:00
Nyall Dawson
83dc159cc5 Correctly handle swapped axis order for proj 6.0 2019-04-05 11:33:08 +10:00
Nyall Dawson
905ccc0917 Fix proj4 build 2019-04-05 11:33:08 +10:00
Nyall Dawson
353060dc36 Add helper method to determine whether a proj string uses angular units 2019-04-05 11:33:08 +10:00
Nyall Dawson
7095eff708 Remove debug noise 2019-04-05 11:33:08 +10:00
Nyall Dawson
250d0d1670 Fix proj4 build 2019-04-05 11:33:08 +10:00
Nyall Dawson
70a8d49d14 Use proj6 for custom projections dialog 2019-04-05 11:33:08 +10:00
Nyall Dawson
c2cac5aab0 Use unique_ptrs for proj object storage
Sponsored by ICSM
2019-04-05 11:33:08 +10:00
Nyall Dawson
95c0d4f182 Port QgsCoordinateTransform to proj 6 API
Sponsored by ICSM
2019-04-05 11:33:08 +10:00
Juergen E. Fischer
eabf56bfb3 fix #21774 2019-04-05 01:15:16 +02:00
Denis Rouzaud
81cfde2ff5
forward declaration of unique_ptr (#9708) 2019-04-04 15:44:58 -05:00
Denis Rouzaud
0a10dc504d
[theme] fix invisible text in field expression widget in dark themes (#9701)
* [theme] fix invisile text in field expression widget in dark themes

only on MacOS at the moment

* switch back to original palette

* remove useless includes

* don't use pointer
2019-04-04 15:42:28 -05:00
Juergen E. Fischer
f1dbcc3c53 processing: fix grass' r.quantile parameter (fixes #21751) 2019-04-04 16:46:37 +02:00
Juergen E. Fischer
9aaaad3ab8 trim crssync include directories (followup 8851328) 2019-04-04 16:42:54 +02:00
Denis Rouzaud
580e7eb6ba
remove forcing Night Mapping theme (#9700)
This hack was introduced when Qt had poor support of Mac Dark Theme so that the combination of the default QGIS theme and Dark Theme on the OS was forcing to use QGIS Night Mapping theme.
Since Qt 5.12, it does look good and it's the last Qt LTS version.
2019-04-04 07:37:29 -05:00
Denis Rouzaud
4d566a34b3
Merge pull request #9695 from 3nids/vertextool_sync_fix
[vertex tool] fixes some editor-tool synchronization issues
2019-04-04 07:33:54 -05:00
rldhont
7de6eeb6d8
Merge pull request #9654 from rldhont/fix-regression-server-print-selection-pdf-master
[Unit-test]To avoid regression in Server printing to PDF output format
2019-04-04 12:28:38 +02:00
Nyall Dawson
037a8283fa Fix crash when searching in layer properties
Fixes #21769
2019-04-04 15:23:39 +10:00
Denis Rouzaud
7410fb0a52
clearer definition of flaky tests (#9693) 2019-04-03 11:02:30 -05:00
Matthias Kuhn
e04395455c
Merge pull request #9291 from dmarteau/fix-HAVE_SERVER_PYTHON_PLUGINS
Fix build without HAVE_SERVER_PYTHON_PLUGINS
2019-04-03 15:57:50 +02:00
David Marteau
e839f277c5 Disable WITH_SERVER_PLUGINS when WITH_BINDINGS=FALSE 2019-04-03 14:48:24 +02:00
Matthias Kuhn
21e08c2f82 Update src/server/services/wms/qgswmsgetlegendgraphics.cpp
Co-Authored-By: dmarteau <dhmarteau@gmail.com>
2019-04-03 14:38:35 +02:00
David Marteau
47fba3266e Fix build without HAVE_SERVER_PYTHON_PLUGINS 2019-04-03 14:38:35 +02:00
Juergen E. Fischer
80a4fc9339 Also retry tx pull on failure 2019-04-03 00:10:26 +02:00
Nyall Dawson
f8f319b6e0 Fix dox 2019-04-03 02:31:27 +10:00
Nyall Dawson
50dd2d6ec7 Unit tests for hashed line symbols 2019-04-03 02:31:27 +10:00
Nyall Dawson
714a4ac77a Remove duplicate test
This is just a direct copy of another test from this file -
the actual ring filter test is in Python
2019-04-03 02:31:27 +10:00
Nyall Dawson
48d2a37057 [FEATURE] New line symbol type: Hash line
This line symbol type is designed to replicate the ArcGIS Hash Line
symbol layer type. It allows for a repeating line segment to be
drawn over the length of a feature, with a line-sub symbol used
to render each individual segment.

To reduce code duplication, this is heavily based off the current
line marker symbol layer, since the functionality is almost
identical (draw some sub symbol at some interval along a line).
Accordingly, I've split off QgsMarkerLineSymbolLayer to move
as much of the common functionality as possible to a new abstract
base class, so that only the actual marker/line segment rendering
occurs in the marker line/hash line subclasses.

This also gives the hash line all the existing placement options
permissible for marker lines -- e.g. first/last vertex, mid points,
regular intervals, etc.

The hash line length and angle can have data defined overrides,
which are evaluated per-line segment, allowing for the hash line
to change size and angle over the length of a single rendered
feature.
2019-04-03 02:31:27 +10:00
Nyall Dawson
59ed07891a Also store x/y coordinates of nearest points on features when calculating
nearest features

This can be useful, and is difficult to calculate later!
2019-04-03 02:31:03 +10:00
Nyall Dawson
95af4d4a45 [FEATURE] New Processing algorithm "Join attributes by nearest"
K-nearest neighbour joins from the Processing toolbox!

This algorithm takes an input vector layer and creates a new
vector layer that is an with additional attributes in its attribute table
The additional attributes and their values are taken from a second
vector layer, where features are joined by finding the closest features
from each layer.

By default only the single nearest feature is joined, but optionally
the join can use the n-nearest neighboring features instead.

If a maximum distance is specified, then only features which are
closer than this distance will be matched.
2019-04-03 02:31:03 +10:00
Nyall Dawson
8d6e3dc911 [FEATURE][API] Add method to QgsSpatialIndex to perform
nearest neighbor search based on QgsGeometry to QgsGeometries

Previously only point - geometry was possible. But with this
change, you can safely and accurately use QgsSpatialIndex
to determine the nearest neighbours between any types of
geometries.
2019-04-03 02:31:03 +10:00
Denis Rouzaud
5667b74d1e [vertex tool] remove locked markers when deactivating 2019-04-02 11:26:22 -05:00
Denis Rouzaud
8a89c5825f [vertex tool] fix editor not updated on geometry changed
slots were not triggered in appropriate order
so we let the vertex tool handle the update of the locked feature geometry on update
2019-04-02 11:25:01 -05:00
Denis Rouzaud
04c53021e1 [vertex tool] update locked markers when adding a new vertex 2019-04-02 10:33:14 -05:00
Juergen E. Fischer
2ef99da242 legend: truncate excessively long tooltips (fixes #21737) 2019-04-02 17:18:40 +02:00
Juergen E. Fischer
c6382553cd don't relink object if just the shared objects/DLL is changed 2019-04-02 17:14:09 +02:00
Juergen E. Fischer
95bd7480d0 postgres provider: use st_estimatedextent only when 'use estimated metadata' is enabled (fixes #21718) 2019-04-02 15:59:51 +02:00
Juergen E. Fischer
a03658663f show more verbose PROJ release info 2019-04-02 14:04:33 +02:00
rldhont
56733ee0f7 Add unit-tests to avoid regression in Server printing to PDF output format
In QGIS 3.4, Selection can be printed in Image output and not in PDF or SVG output.

A fix has been done 2752f83 to fix inconsistent use of layout render context flags, and draw selection is activated with a flag.
2019-04-02 12:44:11 +02:00
Juergen E. Fischer
2a6629ef56 fix build (followup 7674e1657b476889afe63ee8f8b9fd93f581d3c6) 2019-04-02 10:27:05 +02:00
Nyall Dawson
7e23f4ddf6 Run QgsJsonUtils test on Travis
This was originally blacklisted back in the 3.0 transition due to
issues with Qt 5.6. We no longer support that version.
2019-04-02 14:34:46 +10:00
Nyall Dawson
6248bb8eea Fix failing TestQgsJsonUtils 2019-04-02 14:34:46 +10:00
Nyall Dawson
3c6c0ac2d5 Fix locally failing TestQgsColorScheme 2019-04-02 14:34:46 +10:00
Nyall Dawson
d1503e030a Fix network access manager test failing due to server change 2019-04-02 14:34:46 +10:00
Denis Rouzaud
eacd47bfa6
[Travis] Fix backport branch being run as push job (#9680) 2019-04-01 17:29:37 -05:00
Alessandro Pasotti
5b586e8139
Merge pull request #9671 from elpaso/bugfix-server-locale-override
[server] Allow locale and group separator override
2019-04-01 22:50:55 +02:00