15122 Commits

Author SHA1 Message Date
Nyall Dawson
ee51551baa Add method to retrieve highlighted variable list from QgsExpressionContext 2019-04-08 07:07:12 +10:00
Marco Bernasocchi
8b3f97fa19
Merge pull request #9691 from mbernasocchi/check_width_height
Allow setting wmsMaxWidth and wmsMaxHeight in the server env
2019-04-05 20:04:40 +02:00
rldhont
8b508dd4cb
Merge pull request #9696 from rldhont/fix-server-styles-parameters-splitting-master
[server] Server removes empty string in style parameter even if it describes default style
2019-04-05 14:37:54 +02:00
Matthias Kuhn
2bb049ecd1
Code modenization 2019-04-05 11:25:30 +02:00
rldhont
98235eb46b [Bugfix][Server] QGIS Server removes empty string in style parameter even if it describes default style
In OGC WMS standard, the empty string represents the default style.

QGIS Server when it parses the parameters, QGIS Server when it parses parameters it removes empty parts.
When all requested styles are default ones it's equal to an empty parameter STYLE, as defined in the standard.
When only one layer is requested, there is no issue with custom or default style.
When multiple layers are requested and some with custom styles, because QGIS Server does not retain empty strings, it loses the layer / style match.

To fix it, keeps empty parts for not empty styles parameters.
2019-04-05 09:29:21 +02:00
Marco Bernasocchi
2cda2afe3e Add test and sip
add missing methods

Signed-off-by: Marco Bernasocchi <marco@opengis.ch>

Update src/server/qgsserversettings.cpp

Co-Authored-By: mbernasocchi <marco@opengis.ch>

Update src/server/qgsserversettings.cpp

Co-Authored-By: mbernasocchi <marco@opengis.ch>

Update tests/src/python/test_qgsserver_wms_getmap.py

Co-Authored-By: mbernasocchi <marco@opengis.ch>

Update src/server/qgsserversettings.h

Co-Authored-By: mbernasocchi <marco@opengis.ch>

Adress most review comments in PR

Signed-off-by: Marco Bernasocchi <marco@opengis.ch>
2019-04-05 08:01:41 +02:00
nirvn
5e0fd15570 [FEATURE][processing] Add concatenate_unique support to the aggregate alg 2019-04-05 12:01:06 +07:00
nirvn
9fd5509ad0 Add a aggregation method to concatenate unique values 2019-04-05 12:01:06 +07:00
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
c2cac5aab0 Use unique_ptrs for proj object storage
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
Juergen E. Fischer
f1dbcc3c53 processing: fix grass' r.quantile parameter (fixes #21751) 2019-04-04 16:46:37 +02:00
Nyall Dawson
f8f319b6e0 Fix dox 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
Nyall Dawson
6248bb8eea Fix failing TestQgsJsonUtils 2019-04-02 14:34:46 +10: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
Matthias Kuhn
1bb3f99f0e Properly convert to QgsVectorLayerEditpassTrough subclass 2019-04-02 06:18:45 +10:00
Nyall Dawson
39a255c1b9 [processing] Use null instead of nan for invalid stat values in join by location summary 2019-04-02 06:17:56 +10:00
Nyall Dawson
7bf9279a53 [processing] Fix invalid reprojection in join by location (summary) 2019-04-02 06:17:56 +10:00
Nyall Dawson
7674e1657b [processing] Include version information at start of log
Start the log text with QGIS/Qt/GEOS/GDAL version information strings.
This is helpful for debugging and accountability.
2019-04-02 06:16:45 +10:00
Alessandro Pasotti
0355611b60 Added \since QGIS 3.8 2019-04-01 17:25:36 +02:00
Alessandro Pasotti
120ae773b6 [server][feature][needs-docs] Add env vars to override locale ...
...and group separator:

QGIS_SERVER_OVERRIDE_SYSTEM_LOCALE (default '')
QGIS_SERVER_SHOW_GROUP_SEPARATOR (default false)
2019-04-01 16:22:37 +02:00
Juergen E. Fischer
88513284d4 fix removal of temporary directories (fixes #21292) 2019-04-01 14:18:30 +02:00
Alessandro Pasotti
62895d1f42
Merge pull request #9619 from elpaso/plugin-dependencies
Plugin dependencies optional support
2019-04-01 09:43:28 +02:00
Nyall Dawson
9820e6b222 Revert "fix removal of temporary directories"
This reverts commit b141349c90be91f191f612b7e2a349adde3c6349, which
causes crashes in almost every unit test.
2019-04-01 09:30:50 +10:00
Andrea Giudiceandrea
70f3bd7f60 deleteShapeFile(): delete also ".cpg", ".sbn", ".sbx", ".idm", ".ind" files
Make QgsVectorFileWriter::deleteShapeFile() delete ".cpg" (and ".sbn", ".sbx", ".idm", ".ind") files along with ".shp", ".shx", ".dbf", ".prj", ".qix", ".qpj" ones.
2019-04-01 08:37:36 +10:00
Juergen E. Fischer
b141349c90 fix removal of temporary directories 2019-04-01 00:02:12 +02:00
volaya
165ab8b25f [processing] do not export input sdat files 2019-03-30 11:02:25 +10:00
Giovanni Manghi
53e5216aba fix the GRASS7 v.voronoi module, added missing file 2019-03-29 01:22:29 +00:00
Giovanni Manghi
213ca55eba fix the GRASS7 v.voronoi module 2019-03-29 01:22:00 +00:00
Alessandro Pasotti
5b5cc50b9e
Merge pull request #9620 from elpaso/bugfix-badlayers-storage
Bugfix badlayers storage
2019-03-28 08:14:53 +01:00
Nyall Dawson
f5a3485eae Fix some Python warnings, avoid accidently hiding all deprecation warnings 2019-03-28 11:47:23 +10:00
Nyall Dawson
234c1718c4 Mark some Processing methods as deprecated 2019-03-28 11:47:23 +10:00
Nyall Dawson
7aca208522 Update processing script template 2019-03-28 11:47:23 +10:00
Nyall Dawson
f758d8b282 Ensure all public, stable API methods for Processing have nice docstrings 2019-03-28 11:47:23 +10:00
Nyall Dawson
7e80fc8391 Drop isWindows/isMac from stable Processing API 2019-03-28 11:47:23 +10:00
Nyall Dawson
64387a2254 [needs-docs][processing] Monkey patch stable external Processing API into qgis.processing
Instead of encouraging use of the internal Processing modules
(e.g. from processing.tools.general import run , import processing, ...)
instead expose all Python specific STABLE processing additions
to the qgis.processing module.

Instead, scripts and plugins should now use

from qgis.processing import run, algorithmHelp,...

This makes a clear distinction between internal Processing python
modules (i.e., everything else!) and the parts of Processing
which are stable and designed to be used by plugins and scripts.

TODO: QGIS 4.0 -- move the internal Processing plugin modules
to __processing, to clearer indicate that this is all internal
stuff.
2019-03-28 11:47:23 +10:00
Nyall Dawson
bf7d9cb6f8 Don't use copyright license as a module docstring 2019-03-28 11:47:23 +10:00
Denis Rouzaud
631c7016db
scope enum for QgsProcessing::LayerHint (#9639) 2019-03-27 17:23:36 -05:00
Nyall Dawson
858e5d0209 Sipify 2019-03-27 12:53:15 +10:00
Nyall Dawson
545e8bcf2c Add utility class for proj to Python bindings 2019-03-27 12:53:15 +10:00
Nyall Dawson
ef8d893393 More QgsMapLayer python fixes 2019-03-27 09:11:15 +10:00
Nyall Dawson
ac651ee0d9 Followup 8d51a693, fix broken plugins 2019-03-27 07:20:43 +10:00
Denis Rouzaud
8d51a693a1 missing changes of QgsMapLayer::Type => QgsMapLayerType 2019-03-26 14:09:19 -05:00
Denis Rouzaud
60682885c0
Small tweak to enum Python docs (#9631)
original credits to @nyalldawson
2019-03-26 14:00:37 -05:00
Denis Rouzaud
f000956e86
Merge pull request #9437 from 3nids/maplayertype_enum
create scope based enum for QgsMapLayer::LayerType >> QgsMapLayerType
2019-03-26 10:28:34 -05:00