6538 Commits

Author SHA1 Message Date
Nyall Dawson
c5549bea48 Update test mask 2018-11-28 08:27:22 +10:00
Nyall Dawson
f595d53d0a Negative indices count from back of linestring 2018-11-27 09:29:13 +10:00
Nyall Dawson
1e5479964f [FEATURE][API] Add some nice PyQGIS methods and exceptions to QgsLineString
- len(QgsCurve) returns number of points in curve
- raise IndexErrors when calling pointN, xAt, yAt, zAt, mAt, setXAt, setYAt,
setMAt, setZAt with invalid vertex indices
- Add [] getter for retrieving specific vertices, eg. ls[0] returns QgsPoint(...)
- Add [] setter for setting specific (existing) vertices, e.g. ls[1] = QgsPoint(1,2)
- Add del support for removing vertices, e.g. del ls[1] removes the second vertex
2018-11-27 09:29:13 +10:00
swiss-knight
b5ad33f639 Add ACCEPT_USE_OF_DEPRECATED_PROJ_API_H macro for proj_api.h to work with new release of proj4.
(cherry picked from commit 6a7e951442d4f4ce57cb7816d9a4e513c4415fba)
2018-11-27 08:44:42 +10:00
Nyall Dawson
1072ebb621 [browser] Add API to access the drive data items 2018-11-26 18:20:08 +10:00
Alessandro Pasotti
256b58085d
Merge pull request #8526 from elpaso/bugfix-20579-ogr-db-layers-name
[ogr] Use table name as base layer name when adding ogr database layers
2018-11-22 12:49:26 +01:00
Alessandro Pasotti
7094ddf18e Use isValid instead of isNull and add a test for gpkg 2018-11-22 11:00:26 +01:00
Martin Dobias
d4ef55dadb
Merge pull request #8509 from wonder-sk/terrain-map-themes
[FEATURE] Optionally use a map theme to render terrain textures
2018-11-22 09:24:27 +01:00
Alessandro Pasotti
84eed010fe [ogr] Use table name as base layer name when adding ogr database layers
Fixes #20579 - Improve layer name rendering for MySQL connections
2018-11-21 19:23:21 +01:00
Martin Dobias
afd3525297 Add test for terrain theme + do not use project singleton 2018-11-21 16:29:42 +01:00
Mathieu Pellerin
d257cf0776 Add a project properties dialog test case 2018-11-21 21:46:50 +07:00
Mathieu Pellerin
4e1d6841ae Avoid more needless project dirtying 2018-11-21 21:46:50 +07:00
Alessandro Pasotti
5171e4e64d
Merge pull request #8520 from elpaso/bugfix-20549-invalid-xml-gfi
[server] Fix invalid xml in getfeatureinfo
2018-11-21 13:32:35 +01:00
Alessandro Pasotti
bb44e2b60b
Merge pull request #8512 from elpaso/docker-testing-env-tests
Docker testing env tests
2018-11-21 13:27:02 +01:00
Denis Rouzaud
d1d3a51efb
Merge pull request #8429 from lbartoletti/extendMapTool
[needs-docs][FEATURE] Trim/extend
2018-11-21 06:36:08 +01:00
Nyall Dawson
e21ea25c66 Add method to set QgsFeature geometry directly from QgsAbstractGeometry
Allows

    feat.setGeometry(QgsPoint(1,2))

instead of the more obscure

    feat.setGeometry(QgsGeometry(QgsPoint(1,2)))
2018-11-21 08:48:55 +11:00
Alessandro Pasotti
0d696ef1e5 [server] Fix invalid xml in getfeatureinfo
Fixes #20549 - error in parsing WMS GetFeatureInfo as XML

Also s/meta/META/ for consistency with all other tags
2018-11-20 18:26:49 +01:00
Alessandro Pasotti
7e00afc2c7
Merge pull request #8510 from signedav/fix_providerIndex
Don't handle defaultValueClause as not unique value
2018-11-20 11:16:28 +01:00
Alessandro Pasotti
ed9709b4fa Copy updated test runner into the docker
Handle -e and do not exit on error
2018-11-20 10:31:05 +01:00
Alessandro Pasotti
e8e66d086b Fix the python test runner and add a test for it 2018-11-20 10:31:05 +01:00
Nyall Dawson
34c217cd46 Fix crash when calculating offset on certain single curves which become multilinestrings when offset 2018-11-20 05:06:06 +11:00
Nyall Dawson
a22422c4bf [FEATURE][API] Add parts iterators to QgsGeometry
This allows easy iteration over all the parts of a geometry,
regardless of the geometry's type. E.g.

geometry = QgsGeometry.fromWkt( 'MultiPoint( 0 0, 1 1, 2 2)' )
for part in geometry.parts():
  print(part.asWkt())

geometry = QgsGeometry.fromWkt( 'LineString( 0 0, 10 10 )' )
for part in geometry.parts():
  print(part.asWkt())

There are two iterators available. QgsGeometry.parts() gives
a non-const iterator, allowing the parts to be modified in place:

geometry = QgsGeometry.fromWkt( 'MultiPoint( 0 0, 1 1, 2 2)' )
for part in geometry.parts():
   part.transform(ct)

For a const iteration, calling .const_parts() gives a const
iterator, which cannot edit the parts but avoids a potentially expensive
QgsGeometry detach and clone

geometry = QgsGeometry.fromWkt( 'MultiPoint( 0 0, 1 1, 2 2)' )
for part in geometry.const_parts():
   print(part.x())
2018-11-20 05:05:37 +11:00
Nyall Dawson
f5a6aef55f Raise IndexError in PyQGIS when calling geometryN on a collection
with an invalid geometry index

And add len operator to QgsGeometryCollection
2018-11-20 05:05:37 +11:00
signedav
32b7d7e5dd check uniqueCheck before overwrite defaultValueClause
and some tests for it
this fixes #20397 and fixes #20431
2018-11-19 16:54:28 +01:00
Denis Rouzaud
b089b57681
Merge pull request #8480 from lbartoletti/rectangle3PointsProjected
[FEATURE][needs-docs]Add map tool: rectangle 3 points (projected)
2018-11-19 15:21:46 +01:00
Blottiere Paul
50e2b76ae7
Merge pull request #8005 from lbartoletti/bugfix_18902
Fixes #18902 Snapping and tracing inconsistent behaviour
2018-11-19 04:49:03 +00:00
Blottiere Paul
0a42a101c4
Merge pull request #8063 from tudorbarascu/test_server
test server rendering debian buster bug
2018-11-16 08:28:28 +00:00
Matthias Kuhn
438a1daf6a
Merge pull request #8442 from signedav/textfield_null
Range widget: Remove null representator during editing
2018-11-16 09:03:13 +01:00
Tudor Bărăscu
2cf8f74c71 test server rendering debian buster bug #18988 2018-11-16 08:49:55 +02:00
lbartoletti
c292e69e49
Merge branch 'master' into extendMapTool 2018-11-15 11:37:26 +01:00
Martin Dobias
018e9fa28d
Merge pull request #8467 from wonder-sk/configure-lights
[3d] Configuration of lights in 3D map scene
2018-11-14 13:53:27 +01:00
signedav
c8fc7a2419 tests for focus on null field 2018-11-14 12:43:26 +01:00
nirvn
3b892c9759 [project] Avoid needlessly dirtying when written value does not change 2018-11-14 09:39:35 +07:00
lbartoletti
d40f884dfd Add map tool rectangle 3 points where 3rd point is projected on segment p1-p2 2018-11-14 00:19:57 +01:00
Martin Dobias
3692b6a1d7 Fix tests 2018-11-13 17:12:06 +01:00
lbartoletti
be2ac88643
Merge branch 'master' into extendMapTool 2018-11-13 09:04:56 +01:00
lbartoletti
abcf2aa4cf init trim/extend feature 2018-11-13 09:03:26 +01:00
Nyall Dawson
92f34a94d6 Unit tests for binary editor widget 2018-11-13 07:14:19 +10:00
Nyall Dawson
429320d10d [FEATURE] Binary (blob) field support for memory layers
Allows storage of binary blob fields in memory layers
2018-11-13 07:14:19 +10:00
Nyall Dawson
608d03c53d Add support for binary fields to QgsVectorFileWriter 2018-11-13 07:14:19 +10:00
Nyall Dawson
f3f1214df9 Unit test for creation of blob field in existing table 2018-11-13 07:14:19 +10:00
Nyall Dawson
6d5188bdb2 Fix build on Travis 2018-11-13 07:14:19 +10:00
Nyall Dawson
a192dab9de Unit tests for extract binary algorithm 2018-11-13 07:14:19 +10:00
Nyall Dawson
62bdc28de8 Unit tests for updating OGR binary column 2018-11-13 07:14:19 +10:00
Nyall Dawson
cdaf99de53 Don't try to show CRS in map layer model for aspatial tables 2018-11-13 07:14:19 +10:00
Nyall Dawson
5c27b7da50 [FEATURE] Binary blob support for OGR provider
Instead of converting binary fields to truncated strings, we instead
store their contents as QByteArray values, allowing the original binary
content to be retrieved.

This allows for plugins and scripts to utilise binary fields,
such as extracting their contents.
2018-11-13 07:14:19 +10:00
Nyall Dawson
8ae1880d38 Rename method for consistency, fix dox 2018-11-13 07:13:36 +10:00
Nyall Dawson
8703fb219b [FEATURE][API] New class QgsExifTools
Contains utilities for retrieving the geotag from images and
for setting an image's geotag.

Working with geotags (before this class!) is super-annoying
and fiddly and relies on either parsing command line tools
or depending on non-standard Python libraries which are
not available everywhere, and often very difficult for users
on certain platforms to get installed and working correctly.

With this class we have stable methods for geotag getting/setting
which are universally available and can be used safely
by plugins and scripts.
2018-11-13 07:13:36 +10:00
Juergen E. Fischer
669f6bb4b7 OGC parameter names are case-insensitive 2018-11-10 00:53:30 +01:00
Nyall Dawson
d6aa46cfe7 Add some notes to test, additional test with empty line 2018-11-10 07:24:02 +10:00