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

Duplicated WKB type enum #2

Closed
nyalldawson opened this issue Dec 1, 2015 · 2 comments
Closed

Duplicated WKB type enum #2

nyalldawson opened this issue Dec 1, 2015 · 2 comments

Comments

@nyalldawson
Copy link
Contributor

Currently two different enums are used in QGIS for storing WKB types - the older QGis::WkbType and the replacement QgsWKBTypes::Type enum.

Aside from making things difficult to work with (Eg https://github.com/qgis/QGIS/blob/master/src/core/qgsvectorfilewriter.cpp#L1729 ), it also makes it difficult to fully support z/m values throughout QGIS.

For instance, fixing http://hub.qgis.org/issues/12010 requires knowledge that the Postgres datasource contains z values, and the inserted geometry should also have these. Without breaking API and making QgsVectorDataProvider::geometryType() return a QgsWKBTypes::Type (or adding another signature geometryTypeV2() ) this is not currently possible.

A rough estimate is that Qgis::WkbType is used around 1000 times through the codebase, it is unknown at this stage how many occurrences could be just ported in place without additional work.

@mhugo
Copy link

mhugo commented Jan 21, 2016

+1 very important topic

@nyalldawson
Copy link
Contributor Author

This has been fixed thanks to @m-kuhn

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

No branches or pull requests

2 participants