14580 Commits

Author SHA1 Message Date
Nyall Dawson
ee34431214 Use a QHash instead of std::unordered_map
Because it turns out MUCH MUCH faster
2019-01-22 13:14:03 +11:00
Nyall Dawson
ddd357c2ea Add API to QgsRasterBlock to obtain both pixel value AND no data
flag in a single call

This is much more efficient then making two calls, since the
QgsRasterBlock::isNoData() check internally calls QgsRasterBlock::value().
So by requiring API users to make the two separate calls individually,
we double the time this process takes...
2019-01-22 12:13:39 +11:00
Alexander Bruy
bb2c3663b0 [processing] add optional EXTRA parameter to gdalwarp algorithm (fix #20721)
This allows users to pass additional command-line arguments which are
not exposed in the algorithm definition. The most frequent use case is
enabling transparency and adding nodata values.
2019-01-22 09:39:57 +11:00
Julien Cabieces
49cb397f89 Update layer statistics when adding column to table in order to be displayed by QGIS
fixes #13504
2019-01-22 07:54:12 +11:00
Nyall Dawson
d57c182d8b Allow QgsRasterIterator to iterate over a raster layer, WITHOUT
actually fetching the raster block data

This allows for efficient iteration over a "reference" layer, where
you require the block extent/origin/pixel size/etc (but not the
reference layer block data itself!), in order to fetch a block from
a DIFFERENT set of rasters (but keeping these pixel-aligned to the
reference raster).
2019-01-22 07:52:45 +11:00
Alessandro Pasotti
691176b39b Fix POST requests for QGIS server
Followup https://github.com/qgis/QGIS/pull/8830 that fixed
a regression with rewritten urls in the server, unfortunately
my original solution introduced a side-effect on the POST
request, with the new approach I'm introducing a new method
to retrieve the URL as seen by the web server: by default
this is the same URL seen by QGIS server, but in case
a rewrite module made some changes, the original URL will
be used as a base URL if not overridden by a config setting.

This PR comes with an extended set of tests that should
cover both (rewritten and unrewritten) cases for GET and
POST and for WFS/WFS/WCS and WMTS.
2019-01-21 19:15:49 +01:00
Corentin.F
9184a5b273
Update connector.py 2019-01-21 15:50:24 +01:00
Matthias Kuhn
b391c0876f
Merge pull request #8923 from m-kuhn/native_densify_by_interval
Add native densify by interval algorithm
2019-01-21 14:59:47 +01:00
corentin.falcone
11948283e1 update correction 2019-01-21 11:51:03 +01:00
Peter Petrik
1b11ba43a2 fix docs 2019-01-21 11:01:12 +01:00
Peter Petrik
7423a74915 add option to export mesh dataset to raster block (for processing algs) 2019-01-21 11:01:12 +01:00
Matthias Kuhn
9452667af3
Add native densify by interval algorithm 2019-01-21 09:49:38 +01:00
Matthias Kuhn
8db14d8fc2
Merge pull request #8906 from m-kuhn/native_polygons_to_lines
Add native polygonstolines algorithm
2019-01-21 09:11:01 +01:00
Nyall Dawson
eafedeeb8b Sipify 2019-01-21 14:48:19 +11:00
Nyall Dawson
dc7a4ce53c Make URLS in message log clickable 2019-01-21 12:57:54 +11:00
Nyall Dawson
195d98f43a [needs-docs][processing] Port SAGA raster surface volume to native QGIS alg
The SAGA version of this algorithm is of limited use in QGIS, because the
volume calculated is embedded only in the SAGA terminal output. This prevents
it being saved to a file, or reused within a model as an input to a later
model step.

It's also very user-unfriendly, because users must know to manually scan
the algorithm log to find the SAGA output.

Given that the maths here is trivial, this commit ports the algorithm across
to be a native QGIS c++ algorithm. The algorithm duplicates the SAGA alg
1:1, but outputs the volume (and area) to either a HTML report, or a vector
table. Additionally, the outputs are exported as numeric outputs from the
algorithm, allowing them to be re-used within models.

(It's also considerably faster, because it avoids the forced conversion
to SAGA raster format)

Fixes #8607 (properly, even though that report is closed)
2019-01-21 12:33:54 +11:00
Markus Neteler
8db3dead87
Complete grass76 support 2019-01-19 22:08:28 +01:00
Matthias Kuhn
4c8af20b51
Add native polygonstolines algorithm 2019-01-18 19:07:08 +01:00
Marco Hugentobler
575d385e57 Use QgsMapRendererJob::Errors instead of QList< QPair > 2019-01-18 15:46:39 +01:00
Martin Dobias
8709ab61eb
Merge pull request #8893 from wonder-sk/rule-based-3d-renderer
Rule-based 3D renderer
2019-01-18 12:58:11 +01:00
Nyall Dawson
eb256e9498 Fix doxygen warnings 2019-01-18 20:36:30 +11:00
Nyall Dawson
7ba5998db2 Calculate correct legend size when using expression based labels 2019-01-18 20:36:30 +11:00
Nyall Dawson
d70b60d48f [FEATURE][layouts] Allow expressions to be embedded inside legend item text
This feature allows for expressions to be embedded directly inside
legend item text (e.g. group, subgroup and item text). The expressions
are evaluated at render time, with full knowledge of the legend's
expression context (so can utilise variables from the layout/layout item/
etc)

There's no UI for this yet (that will come in 3.8), but expressions are
entered using the standard [% 1 + 2 %] format.

E.g. a legend item text of

    My layer (rendered at 1:[% @map_scale %])

will show in the output as

    My layer (renderer at 1:1000)
2019-01-18 20:36:30 +11:00
Martin Dobias
9875821b04 Review fixes, sip, doc fixes, icons, style panel fix 2019-01-18 09:32:53 +01:00
Alex
b43943a9b0 [FEATURE] New expression variables for legend items
Adds new variables for use in data defined expressions for layout legend items, including

- @legend_title
- @legend_column_count
- @legend_split_layers
- @legend_wrap_string
- @legend_filter_by_map
- @legend_filter_out_atlas

Additionally, if the legend is linked to a map, then expressions used in that legend will also have access to the linked variables, including @map_scale, @map_extent, etc.
2019-01-18 13:38:21 +11:00
Nyall Dawson
a0e91f3798 Add API to read/write QgsExpressionContextScope from/to XML 2019-01-18 12:56:05 +11:00
Ivan Ivanov
2488f71ddb Added test for 'gdal_rasterize -init 0' 2019-01-18 09:50:08 +11:00
Ivan Ivanov
36c821da34 Allow gdal_rasterize to accept -init with value of 0; changed default value to not introduce a breaking change 2019-01-18 09:50:08 +11:00
Denis Rouzaud
5fa5631bbd
add enum value to key and reverse helpers (#8879)
* add enum value to key and reverse helpers

* cast cont char* to QString

* use QStringLiteral
2019-01-17 09:40:13 -05:00
Marco Hugentobler
0f3c39deb7 Server: throw exception in GetMap if DB connection is not ok 2019-01-17 08:55:18 +01:00
Nyall Dawson
3d283c1b05 [needs-docs] Show actual linked color in color buttons when color
has been linked to a project color

Instead of only showing linked color status in the accompanying
data defined button, we now also show it inside the color button
itself. So now the button color is a live reflection of the
project color it is linked to.

Additionally, when the color is linked, the button only allows
users the choice of "unlinking" the color from the linked
project color. The usual color button options allowing users
to directly change the color are not present. (As linked
colors must be edited in the project colors section from
the project properties dialog)
2019-01-17 16:14:32 +11:00
Nyall Dawson
f89d061ba0 [FEATURE][processing] Add geodesic mode for "Join by Lines (Hub lines)" algorithm
This allows optional creation of geodesic lines, which represent the
shortest distance between the points based on the ellipsoid.

When geodesic mode is used, it is possible to split the created lines
at the antimeridian (±180 degrees longitude), which can improve
rendering of the lines. Additionally, the distance between vertices
can be specified. A smaller distance results in a denser, more accurate
line.
2019-01-17 03:39:20 +11:00
Nyall Dawson
2aab28380c [browser] Don't show gdal/ogr layer items for QGIS style xml files
These aren't layers, so the extra entries are just distracting noise.
2019-01-16 12:10:25 +11:00
Nyall Dawson
878cec9977 Allow additional tags to be set when copying items to default style 2019-01-16 12:04:34 +11:00
Nyall Dawson
42a7804323 Add method to hide favorites and smart groups from style manager dialog 2019-01-16 12:04:34 +11:00
Nyall Dawson
ec8b299b9b Add a read only mode to QgsStyleManagerDialog
Allows the dialog to browse an existing style, but prevents users
from making any edits to the style.
2019-01-16 12:04:34 +11:00
lbartoletti
c885cd7267 add toString and repr for qgsvector 2019-01-16 01:10:33 +11:00
Mathieu Pellerin
6957009f8b [themes] Fix the processing modeler's rendering on dark backgrounds 2019-01-15 12:24:50 +07:00
Alex
004d6bae5f Add QgsRenderContext to QgsLayerTreeModelLegendNode::ItemContext 2019-01-15 13:37:36 +11:00
lbartoletti
edadcb773f Refactoring of rectangle maptools
Adds a new geometry class QgsQuadrilateral, for 4 sided geometries.
2019-01-15 10:24:16 +11:00
Peter Petrik
cd9a84e11c [feature] [mesh] Mesh Calculator
Similarly to raster calculator, mesh calculator can take dataset groups from current mesh layer and
combine them with various aritmentic/logical operators to new dataset group.
2019-01-14 12:32:36 +01:00
Nyall Dawson
f8af098fc2 Correctly handle selection of mixed item types 2019-01-14 18:10:54 +10:00
Nyall Dawson
d5cedfe9f5 Dox++, deprecate method 2019-01-14 18:10:54 +10:00
Nyall Dawson
b72e01f0c7 Use QgsStyleModel in Style Manager dialog
Fixes MANY symbol filtering issues in the dialog, and brings many
improvements (e.g. hidpi fixes, nicer tooltips, etc)
2019-01-14 18:10:54 +10:00
Nyall Dawson
ef250c4563 Fix main panel ownership in QgsPanelWidgetStack bindings 2019-01-14 16:41:08 +10:00
Raymond Nijssen
0ba9a326ec Add API to calculate innerTangents for 2 circles 2019-01-14 05:27:19 +10:00
Nyall Dawson
ac10769809 Move method for detecting project colors to QgsProperty 2019-01-12 18:11:44 +10:00
Nyall Dawson
f7745c94d9 Add a signal to QgsProject for when project color scheme changes 2019-01-12 18:11:44 +10:00
Nyall Dawson
7b664ea9a8 Fix see also link 2019-01-12 05:31:00 +10:00
Nyall Dawson
629de0c651 Fix some corner cases 2019-01-12 05:31:00 +10:00