Skip to content

createprojection fails if 'polar' template is chosen #102

Description

>>> 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions