5236 Commits

Author SHA1 Message Date
Denis Rouzaud
1bc0fbf9d4 [locator] allow to have context menu entries for results 2018-11-28 07:46:24 -04:00
Juergen E. Fischer
60ea432cbc fix windows build (partly reverts 1a199d095) 2018-11-27 23:16:03 +01:00
Nyall Dawson
6cc41a9474 Remove an incorrect /Transfer/ annotation, add a missing /Transfer/ annotation 2018-11-27 19:07:06 +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
Nyall Dawson
1072ebb621 [browser] Add API to access the drive data items 2018-11-26 18:20:08 +10:00
Mathieu Pellerin
4e1d6841ae Avoid more needless project dirtying 2018-11-21 21:46:50 +07: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
5603546c26 Dox 2018-11-21 08:48:55 +11: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
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
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
lbartoletti
c292e69e49
Merge branch 'master' into extendMapTool 2018-11-15 11:37:26 +01:00
lbartoletti
574a57f2e4 Merge branch 'extendMapTool' of github.com:lbartoletti/QGIS into extendMapTool 2018-11-13 13:39:56 +01:00
Peter Petrik
0e413c04bc sipify 2018-11-13 10:48:02 +01:00
Peter Petrik
7564276994 QPrinter is unavailable on some platforms 2018-11-13 10:48:02 +01:00
Peter Petrik
1559013270 support platforms that does not have QProcess support (iOS) 2018-11-13 10:48:02 +01:00
lbartoletti
a8f865917e Nyall's review 2018-11-13 09:03:26 +01:00
lbartoletti
abcf2aa4cf init trim/extend feature 2018-11-13 09:03:26 +01:00
Denis Rouzaud
30cf2d37bc
Merge pull request #8404 from 3nids/locator_core
Move parts of QgsLocatorFilter to core
2018-11-09 12:18:27 +00:00
Denis Rouzaud
f4f5d1ef5b missing destructor 2018-11-09 10:01:38 +00:00
Denis Rouzaud
31cd1644c3 also move triggering of results to core 2018-11-09 10:01:29 +00:00
Nyall Dawson
ba17b130f8 Move forceRHR to QgsGeometry, avoid duplicate code 2018-11-09 19:06:48 +10:00
Nyall Dawson
30214538c2 [FEATURE] Add option to simple line and marker line to only
render exterior ring or interior rings

This option is shown whenever a simple line symbol or
marker line symbol is used as part of a fill symbol for
rendering polygons.

The default behavior is to render both interior and exterior
rings, but this new setting allows users to set the symbol
layer to render only for the exterior ring OR only
for interior rings.

This allows for symbolisation which wasn't directly possible
before, such as a marker line with markers for interior
rings angled toward the interior of the polygon.

Sponsored by the German QGIS User Group

Fixes #12652
2018-11-09 19:06:48 +10:00
Nyall Dawson
a947bb3b9b Dox++ 2018-11-09 19:06:48 +10:00
Nyall Dawson
73d0ced5df [FEATURE] Add option to force right-hand-rule during polygon symbol rendering
This new option, available under the "Advanced" button for fill symbols,
allows forcing rendered polygons to follow the standard "right hand
rule" for ring orientation (where exterior ring is clockwise, and
interior rings are all counter-clockwise).

The orientation fix is applied while rendering only, and the original
feature geometry is unchanged.

This allows for creation of fill symbols with consistent appearance,
regardless of the dataset being rendered and the ring orientation
of individual features.

Refs #12652
2018-11-09 19:06:48 +10:00
Nyall Dawson
27e1ef5c1c Add method to QgsCurvePolygon to force RHR, ensuring standard ring orientation 2018-11-09 19:06:48 +10:00
Nyall Dawson
c22364d45e Add method to determine orientation of closed curves 2018-11-09 19:06:48 +10:00
Nyall Dawson
4b32e7cc78 [afs] Implemented decodeUri for AFS provider
Allows retrieval of the web URL for an AFS layer
2018-11-07 15:30:17 +10:00
Denis Rouzaud
107e646219 rename QgsLocatorWidgetCore to QgsLocatorModelBridge 2018-11-06 13:59:37 -04:00
Denis Rouzaud
f652e8dcba save current extent and CRS in locator core
remove remaining bits of interface
2018-11-06 13:37:39 -04:00
Denis Rouzaud
6a9d7a69d8 implement roleNames for QgsLocatorModel 2018-11-06 10:09:20 -04:00
Denis Rouzaud
20d8db9e28 Revert "create a core interface for QgsMapCanvas"
This reverts commit 79c5b35a3925336e01e9ac1a6a75fd32eb3b8cdd.
2018-11-06 10:09:12 -04:00
Denis Rouzaud
078b445057 move part of the logic of QgsLocatorWidget to core 2018-11-06 10:08:33 -04:00
Denis Rouzaud
79c5b35a39 create a core interface for QgsMapCanvas 2018-11-06 10:06:22 -04:00
Alessandro Pasotti
c8b26771cf
Merge pull request #8359 from elpaso/handle-bad-layers2
[needs-docs][feature] Deferred handling of bad layers
2018-11-06 08:43:18 +01:00
Nyall Dawson
19ef2f904b Add missing /Factory/ annotation 2018-11-05 22:02:32 +10:00
Nyall Dawson
82baff87d4 Add a __repr__ method to QgsMimeDataUtils::Uri 2018-11-05 22:02:32 +10:00
Alessandro Pasotti
f02345bd8b Remove unnecessary project from test data 2018-11-05 10:27:02 +01:00
Alessandro Pasotti
eb02004b60 Store original style as QDomDocument instead of an XML string 2018-11-05 10:27:02 +01:00
Alessandro Pasotti
a4182c1e04 Remove unnecessary project from test data 2018-11-05 10:26:39 +01:00
Alessandro Pasotti
7a259c6ea5 Better handling of invalid relations ...
- do not add them to the manager dialog
- do not add relations to not existent layers (but keep relations to invalid layers)
2018-11-05 10:26:39 +01:00
Alessandro Pasotti
bc424d09c1 Store original style as QDomDocument instead of an XML string 2018-11-05 10:26:39 +01:00
Alessandro Pasotti
0cd21c91f1 Keep invalid relations and update them when the data source changes
Added a check for layer.isValid in relation.isValid, keep
relations in the manager even if they are not valid and
connect dataSourceChanged with updateRelationStatus
2018-11-05 10:24:35 +01:00
Alessandro Pasotti
2bd90da9c1 Added a validOnly flag to mapLayers to filter for valid layers only 2018-11-05 10:24:35 +01:00
Alessandro Pasotti
3fe7848c16 Noted in the method documentation that dataProvider() may return null 2018-11-05 10:24:35 +01:00
Alessandro Pasotti
f856b4c8e3 Renamed originalXmlProperties methods and variables 2018-11-05 10:24:35 +01:00
Alessandro Pasotti
326640d881 Implement setDataSource for rasters 2018-11-05 10:24:35 +01:00
Alessandro Pasotti
c32d542be5 Move setDataSource to QgsMapLayer
also setter and getter for providerType
2018-11-05 10:24:35 +01:00