Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for traversal of geometry's vertices using iterator pattern #5367

Merged
merged 2 commits into from Oct 15, 2017

Conversation

wonder-sk
Copy link
Member

This is #4513 rebased to the current master.

Introducing:

STL-style iterator: QgsAbstractGeometry::vertex_iterator
Java-style iterator: QgsVertexIterator (built on top of STL-style)
The iterators are modeled after Qt's STL-style and Java-style iterators,
the idea is to replace nextVertex() method and later introduce iterators
for other bits (e.g. part_iterator, ring_iterator).

Introducing:
1. STL-style iterator: QgsAbstractGeometry::vertex_iterator
2. Java-style iterator: QgsVertexIterator (built on top of STL-style)

The iterators are modeled after Qt's STL-style and Java-style iterators,
the idea is to replace nextVertex() method and later introduce iterators
for other bits (e.g. part_iterator, ring_iterator).
@wonder-sk wonder-sk merged commit ae4d26a into qgis:master Oct 15, 2017
@nyalldawson
Copy link
Collaborator

Awesome... can't wait to start putting this to use!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants