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

createprojection fails if 'polar' template is chosen #102

Closed
ghost opened this issue Nov 29, 2016 · 1 comment
Closed

createprojection fails if 'polar' template is chosen #102

ghost opened this issue Nov 29, 2016 · 1 comment
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Nov 29, 2016

>>> import vcs
>>> vcs.createprojection('new_polar', 'polar')
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-2-ef647a454e85> in <module>()
----> 1 vcs.createprojection('new_polar','polar')

/Users/brown308/projects/embrown/documentation/vcs/vcs/vcs/manageElements.pyc in createprojection(name, source)
    118 
    119     name, source = check_name_source(name, source, 'projection')
--> 120     return projection.Proj(name, source)
    121 createprojection.__doc__ = createprojection.__doc__ % xmldocs.create_docs['projection']
    122 

/Users/brown308/projects/embrown/documentation/vcs/vcs/vcs/projection.pyc in __init__(self, Proj_name, Proj_name_src)
    432         if Proj_name != "default":
    433             src = vcs.elements["projection"][Proj_name_src]
--> 434             self.type = src.type
    435             self.parameters = copy.copy(src.parameters)
    436         vcs.elements["projection"][Proj_name] = self

/Users/brown308/projects/embrown/documentation/vcs/vcs/vcs/projection.pyc in _settype(self, value)
    985 
    986     def _settype(self, value):
--> 987         value = VCS_validation_functions.checkProjType(self, 'type', value)
    988         self._type = value
    989 

/Users/brown308/projects/embrown/documentation/vcs/vcs/vcs/VCS_validation_functions.pyc in checkProjType(self, name, value)
   1438             pass
   1439         if checkedvalue == "THAT DID NOT WORK":
-> 1440             checkedRaise(self, value, Exception, err)
   1441 
   1442     self._type = checkedvalue

/Users/brown308/projects/embrown/documentation/vcs/vcs/vcs/VCS_validation_functions.pyc in checkedRaise(self, value, ex, err)
     57     if vcs._doValidation:
     58         if err is not None:
---> 59             raise ex(err)
     60         else:
     61             raise ex

Exception: type can either be ('linear', 'utm', 'state plane', 'albers equal area', 'lambert', 'mercator', 'polar', 'polyconic', 'equid conic a', 'transverse mercator', 'stereographic', 'lambert azimuthal', 'azimuthal', 'gnomonic', 'orthographic', 'gen. vert. near per', 'sinusoidal', 'equirectangular', 'miller', 'van der grinten', 'hotin', 'robinson', 'space oblique', 'alaska', 'interrupted goode', 'mollweide', 'interrupted mollweide', 'hammer', 'wagner iv', 'wagner vii', 'oblated') or (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30)

The exception output is especially confusing because it lists 'polar' as a valid type.

@ghost ghost added the bug label Nov 29, 2016
@doutriaux1 doutriaux1 modified the milestone: 3.0 May 5, 2017
@doutriaux1 doutriaux1 modified the milestones: 3.0, post 3.0 Mar 29, 2018
@doutriaux1 doutriaux1 modified the milestones: 8.1, 8.2 Mar 27, 2019
@doutriaux1
Copy link
Contributor

doutriaux1 commented Apr 18, 2019

works now

@downiec downiec modified the milestones: 8.2, 8.2.1 Jul 27, 2020
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

2 participants