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

Remove formatting methods from QgsPoint #12

Closed
nyalldawson opened this issue Dec 1, 2015 · 1 comment
Closed

Remove formatting methods from QgsPoint #12

nyalldawson opened this issue Dec 1, 2015 · 1 comment

Comments

@nyalldawson
Copy link
Contributor

QgsPoint has a bunch of methods for formatting a point to various strings, eg toDegreesMinutes. These should ideally be moved out of QgsPoint into a new QgsCoordinateFormatter class, with static methods for converting QgsPoint/V2/x & y doubles to the various formats.

Furthermore, the methods in QgsPoint are restrictive in that they always return both formatted latitude and longitude. Composer grids (and I suspect other code areas) need to then manually attempt to split the string back into separate lat/long components for rendering. It's inefficient and fragile, and there should be a way to retrieve just the formatted latitude or longitude.

@nyalldawson
Copy link
Contributor Author

Fixed in master

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

1 participant