33 Commits

Author SHA1 Message Date
Nyall Dawson
4c704be606 Add geometry methods for calculating the distance to a specified
vertex from the start of the geometry
2016-04-06 20:55:26 +10:00
Nyall Dawson
3a1f6c429d Improve documentation for QgsGeometry::closestVertex 2016-04-06 20:55:26 +10:00
Juergen E. Fischer
e503c705a1 change QgsAbstractGeometryV2::coordinateSequence() to return a
implicitly shared copy of an internal cache instead of recreating the
coordinate sequence again and again.

Improves performance of the nodetool on large features a lot (refs #13963)

Also introduce Qgs(Coordinate|Ring|Point)SequenceV2 typedefs.
2016-02-21 21:49:51 +01:00
Juergen E. Fischer
a90be95f7b sip sync 2016-02-14 03:50:49 +01:00
Hugo Mercier
e2123c79e5 Fix addFeature and addPart maptool for layers with a Z 2016-02-09 10:44:41 +01:00
Nyall Dawson
c3a57434d9 Fix clazy 'pass small and trivially-copyable type by value' warnings 2016-02-02 19:47:21 +11:00
Juergen E. Fischer
4dd76da7f8 geometry sip sync and some cosmetics 2016-01-28 10:31:08 +01:00
Nyall Dawson
275eb9463d [FEATURE] Add closest_point and shortest_line expression functions
closest_point: returns closest point a geometry to a second geometry
shortest_line: returns the shortest possible line joining two
geometries
2016-01-15 12:50:17 +11:00
Nyall Dawson
c0f4fb1466 Followup e48d8b, fix typo 2016-01-15 08:34:42 +11:00
Matthias Kuhn
542541007c Add extrude function to QgsGeometry 2016-01-14 12:28:31 +01:00
Juergen E. Fischer
71dc339106 more stl to qt ports and size_t => int fixups 2015-12-26 00:59:09 +01:00
Matthias Kuhn
cd0eb05ded [py3] Some compatibility fixes for python 3 2015-10-24 13:47:32 +02:00
Juergen E. Fischer
bf64f8d0a0 spelling fixes and indentation update 2015-10-22 21:56:54 +02:00
Nyall Dawson
5654eeca55 Fix area calculation when OTF active and no ellipsoid (fix #13601) 2015-10-15 17:51:07 +11:00
Nyall Dawson
ad10b5264e Fix using add part tool to add part to geometryless rows
(fix #12885, #11319)

Also fix some potential crashes with edit tools and null geometry
2015-10-13 16:59:52 +11:00
Sandro Mani
c927073e20 Add some docstrings 2015-10-08 11:28:32 +02:00
Nyall Dawson
c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00
Nyall Dawson
0caf944747 Misc optimisations identified by clazy:
- call reserve on container classes where applicable
- make sure Q_FOREACH uses references
- remove dynamic casts to base classes
- fix some implicit bool conversions
2015-10-05 18:43:18 +11:00
Sandro Mani
e9e638f6f4 Geometry Checker and Geometry Snapper plugins 2015-09-21 10:03:24 +02:00
Nyall Dawson
8ce9930f4a Fix leak in add map tool 2015-09-01 16:07:10 +10:00
Juergen E. Fischer
9752c468c1 indentation update 2015-07-29 11:52:14 +02:00
Marco Hugentobler
39f8bd9eb9 Add factory annotation 2015-06-25 11:34:36 +02:00
Marco Hugentobler
7b31f8a02f Remove python bindings for QgsGeos, move createGeometryEngine() from edit utils to QgsGeometry class 2015-06-25 10:45:53 +02:00
Nyall Dawson
e53debe215 Update doxygen comments for QgsGeometry, reflecting that QgsGeometry
is a generic geometry container from >= 2.10.
2015-06-22 21:29:51 +10:00
Nyall Dawson
53218948b1 Add QgsGeometry::isEmpty to test if underlying geometry exists 2015-06-13 13:43:17 +10:00
Nyall Dawson
80cfbbf37e Add method to set QgsAbstractGeometry for QgsGeometry, add tests
for implicit sharing of QgsGeometry
2015-06-12 22:50:47 +10:00
Marco Hugentobler
624d142ec4 Fix bugs related to adding and removing geometry parts 2015-06-07 11:07:50 +02:00
Juergen E. Fischer
df0b842fdb geometry sip sync 2015-06-01 15:17:56 +02:00
Nyall Dawson
41ad9abb40 Fix geometry errors:
- Add some missing docs
- Add some missing detach calls
- Hide unimplemented clip method to avoid confusion for 2.10 api
- Fix broken distance method
- Fix broken split method
2015-06-01 21:44:57 +10:00
Marco Hugentobler
82d18e7e61 Update python binding for QgsGeometry 2015-05-29 11:40:20 +02:00
Nyall Dawson
e7219050a1 Avoid unnecessary detach of QgsFeature when renderering non-curved
geometries
2015-05-29 06:46:42 +10:00
Marco Hugentobler
b5801afe29 Update python bindings for QgsGeometry 2015-05-26 11:42:52 +02:00
Marco Hugentobler
68fe5f5791 [FEATURE:] New geometry classes 2015-05-25 08:53:49 +02:00