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

Proj4 string sanitizer #29

Open
karimbahgat opened this issue Nov 23, 2018 · 0 comments
Open

Proj4 string sanitizer #29

karimbahgat opened this issue Nov 23, 2018 · 0 comments
Labels

Comments

@karimbahgat
Copy link
Owner

@djhoese wrote:

Another thought on functionality that could be added to these classes (if it doesn't exist somewhere else) would be a "sanitize" or "normalize" function so that I could take any user's PROJ.4 string and get a "consistent" PROJ.4 string back with defaults fill in.

Could that be accomplished simply by parsing the proj4 string, and then converting it back out to proj4? I.e. crs = pycrs.parse.from_proj4(...); sanitized = crs.to_proj4(). In some ways, the parsing function does do some sanity checks and adds in some defaults. If it's sufficient, maybe we could just add it as an example in the docs.

Or are there some issues this method would not cover, so that a sanitizing function would provide some extra value?

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

No branches or pull requests

1 participant