5687 Commits

Author SHA1 Message Date
Nyall Dawson
cec59c0c39 Shutup more annoying Qt warnings 2018-05-01 17:39:21 +10:00
Nyall Dawson
6ca327072a [FEATURE] Add expression functions for tapered and variable
width buffers

Adds:
- tapered_buffer
- buffer_by_m

expression functions. These expose the same functionality as the
equivalent processing algorithms but for use in expressions
such as geometry generators.
2018-05-01 06:16:01 +10:00
Nyall Dawson
9ffae600f4 [FEATURE] Variable width buffers
Adds geometry methods to create variable width buffers, including
tapered buffers (with a specified start and end diameter) and
variable width buffers from line string m values.

Also adds processing algorithms which expose these methods
to processing.
2018-05-01 06:16:01 +10:00
Nyall Dawson
2d3d6a8b83 [afs] Fix handling of date/datetime field values 2018-05-01 06:15:22 +10:00
Loïc Bartoletti
9f3d571155 clean tests and add a new test for snapping on inivisble feature 2018-04-30 17:02:47 +02:00
Nyall Dawson
c314639e00 [processing] More stringent testing of parameter validity
- Check static QgsProperty parameter values
- Properly check QgsProcessingFeatureSourceDefinition and
QgsProcessingOutputLayerDefinition values
2018-04-28 05:50:47 +10:00
Nyall Dawson
249dca7830 [processing] Consist helpful error messages when sinks cannot be created
And throw exceptions always when sinks are not created to avoid
generic errors
2018-04-28 05:50:47 +10:00
Nyall Dawson
5339d62715 [processing] More helpful errors when sources cannot be loaded
Include descriptive text with the specified parameter value
in error, and always check that sources were loaded to avoid
raw Python exceptions when they are not
2018-04-28 05:50:47 +10:00
Martin Dobias
16a6a90dd7
Merge pull request #6859 from wonder-sk/overlay-alg-fixes-3
Port Union algorithm to C++ and fix it
2018-04-26 22:56:22 +02:00
Blottiere Paul
1afe0d1bb8 Add unit tests 2018-04-26 16:18:29 +01:00
Peter Petrik
b1bf9b2809 [FEATURE] Introduction of QGIS Quick library
This pull request is a subset of #6490

This adds a new library for creation of applications based on Qt Quick
framework.
It contains reusable QML / Qt Quick components based on QGIS core
library.
The initial work introduces MapCanvas

To enable compilation of the library, use WITH_QUICK=TRUE

Further documentation of the library is located in doc/qgsquick.dox

For background information see the associated QEP:
qgis/QGIS-Enhancement-Proposals#109

The initial implementation is largely based on the work of Matthias Kuhn
and Marco Bernasocchi on QField probject - kudos to them for the great
job!
2018-04-26 13:33:48 +02:00
Blottiere Paul
ba02a5e258
Merge pull request #6851 from pblottiere/bugfix_segfault_z
[bugfix]  Fixes Add Feature map tool when snapped layer has ZM support
2018-04-26 11:59:07 +01:00
Nyall Dawson
c3b69900f7 Followups 2018-04-26 19:01:50 +10:00
Nyall Dawson
c78bdaebca [oracle] Some updates to Oracle provider test suite
Now the Oracle provider passes the data provider edit stress/
conformance tests without issue!
2018-04-26 19:01:50 +10:00
Nyall Dawson
3a3b0fe56d [oracle] Fix handling of NULL values when add features to provider
Fixes NULL attribute values are incorrectly converted to empty
strings or 0 numeric values instead of NULL.
2018-04-26 19:01:50 +10:00
Martin Dobias
5e7719c38f Tests for fieldNamesToIndices() and indicesToFields() 2018-04-26 10:51:34 +02:00
Nyall Dawson
d8c36233e8 Remove some more redundant include directories 2018-04-26 17:28:59 +12:00
Nyall Dawson
3f6e411edb Remove some redundant geos includes 2018-04-26 17:28:59 +12:00
Nyall Dawson
d5626d9236 Remove geos include from qgsgeometry.h
Avoids the need to include geos from some build targets
2018-04-26 17:28:59 +12:00
Martin Dobias
ade216d02d
Merge pull request #6820 from PeterPetrik/QgsMeshLayer_1_mesh
[FEATURE] QgsMeshLayer part 1: Reading raw mesh
2018-04-25 09:02:24 +02:00
Blottiere Paul
f8e72ad3bd Add unit tests 2018-04-24 17:38:46 +01:00
Loïc Bartoletti
5e5fdf9489 fix martin's review 2018-04-24 17:44:52 +02:00
rldhont
120d5b1d11 [Tests][Server] Add unit test for empty contextual legend
Manually port c217cbb4dd140695af74debbe052dbefc1d21e74
2018-04-24 13:17:31 +02:00
Nathan Woodrow
409ec85329
[FEATURE][needs-docs] Rework expression parser for unknown functions (#6840)
* [FEATURE][needs-docs] Rework expression parser for unknown functions

* Remove old comment

* Rename NAME and update tests

* Change COLUMN_REF to QUOTED_COLUMN_REF
2018-04-24 14:26:41 +10:00
Nyall Dawson
70b67c6150 Add some more line segment methods 2018-04-24 10:07:51 +12:00
Nyall Dawson
cd3b976d7e Add class for comparing angles to points in a clockwise fashion 2018-04-24 10:07:51 +12:00
Nyall Dawson
fa9f62fc1c Add class for comparing distance from two line segments to an origin 2018-04-24 10:07:51 +12:00
Nyall Dawson
6e6ddbba3f Add QgsRay2D class representing an infinite ray from a point in a direction 2018-04-24 10:07:51 +12:00
Nyall Dawson
8f1d1a31c9 Add reverse method to QgsLineSegment2D 2018-04-24 10:07:51 +12:00
Nyall Dawson
646b4af057 Add left of line test to QgsLineSegment2D 2018-04-24 10:07:51 +12:00
Nyall Dawson
c6a50fe772 Add QgsLineSegment2D class, for simple 2d line segments which
consist of just a 2D start and end point
2018-04-24 10:07:51 +12:00
Nyall Dawson
01f036cf52 Add some useful QgsVector methods 2018-04-24 10:07:51 +12:00
Nyall Dawson
d5647bcbdb [FEATURE] Add wedge_buffer expression function
Returns a wedge shaped buffer originating from a point geometry,
with arguments for azimuth, buffer width (in degrees), outer radius
and inner radius.
2018-04-24 10:07:51 +12:00
Nyall Dawson
e047738981 Add QgsGeometry method to create wedge shaped buffers
Creates a wedge shaped buffer using circular strings, with
parameters for azimuth, wedge width (in degrees), outer radius
and inner radius.
2018-04-24 10:07:51 +12:00
Nyall Dawson
9a6d966d35 Allow using the longer arc with two point and center methods 2018-04-24 10:07:51 +12:00
Nyall Dawson
732d6bb475 Add convenience constructors to create QgsCircularStrings
Add constructors to create a circular string with a single arc:
- from 3 points on arc
- from 2 points and a center
2018-04-24 10:07:51 +12:00
Nyall Dawson
3f3b9515ef Add convenience constructor to create QgsLineString between two points 2018-04-24 10:07:51 +12:00
Nyall Dawson
fbf6b4a383 Add geometry method to calculate mid point on an arc from p1->p2 with given center
And improve some docstrings
2018-04-24 10:07:51 +12:00
Nyall Dawson
ac7760be10 Indentation 2018-04-24 09:10:39 +12:00
Nyall Dawson
6c867c0dc5 [oracle] Fixes for edit tests (still disabled) 2018-04-24 09:10:39 +12:00
Nyall Dawson
92a80894ac [oracle] Add read-only support for curved geometry types
Previously these geometries were silently discarded

Fixes #12675, #16809

Sponsored by Open Spatial (http://www.openspatial.com)
2018-04-24 09:10:39 +12:00
Loïc Bartoletti
66b0e59fb9 Fix snapping on invisible geometry 2018-04-23 16:00:43 +02:00
Nathan Woodrow
76b956a6a3
[FEATURE][needs-docs] Don't bail on first expression error (#6838) 2018-04-23 10:50:43 +10:00
Loïc Bartoletti
f558b742cf Add tests 2018-04-21 08:16:14 +10:00
Loïc Bartoletti
0bacf0ff16 - Add some methods in QgsVector3D
- Move QgsVector3D from 3d to core
- Use QgsVector3D instead of QVector3D
2018-04-21 08:16:14 +10:00
Loïc Bartoletti
9d649e738a Add skewLines intersection algorithm 2018-04-21 08:16:14 +10:00
rldhont
f914762b46
Merge pull request #6793 from pblottiere/bugfix_owslib
[server][bugfix] Cleaning GetCapabilities response
2018-04-20 14:12:17 +02:00
Nyall Dawson
6a2625664e [processing] Add dedicated "distance" parameter
This is a subclass of QgsProcessingParameterNumber, but specifically
for numeric parameters which represent distances. It is linked
to a parent parameter, from which the distance unit will
be determined, and is shown using a dedicated distance widget
within the processing parameters panel. This widget shows
the distance unit.

This avoids the confusion when running algorithms which
use distances where the unit depends on a layer or CRS parameter -
e.g. the distance parameter in the buffer algorithm gives
the distance in layer units... so now we can show those units
directly within the dialog. Hopefully this leads to less
user confusion and accidental "1000 degree buffers"!

Additionally - if the unit is in degrees, a small warning
icon is shown next to the parameter. The tooltip for this
icon advises users to reproject data into a suitable
projected local coordinate system.

Initially implemented for the native buffer and single
sided buffer algorithm only - but more will be added.

Fixes #16290
2018-04-20 18:27:00 +10:00
Peter Petrik
1efdbc5c20 fix build errors, use MDAL 0.0.2 (int API) 2018-04-19 16:42:01 +02:00
Martin Dobias
f1a31d09f1 Use standard font for text on symbol 2018-04-19 14:23:49 +02:00