60 |
("tmerc", _("Transverse Mercator"), TMPanel), |
("tmerc", _("Transverse Mercator"), TMPanel), |
61 |
("utm", _("Universal Transverse Mercator"), UTMPanel), |
("utm", _("Universal Transverse Mercator"), UTMPanel), |
62 |
("lcc", _("Lambert Conic Conformal"), LCCPanel), |
("lcc", _("Lambert Conic Conformal"), LCCPanel), |
63 |
("latlong", _("Geographic"), GeoPanel)] |
("latlong", _("Geographic"), GeoPanel), |
64 |
|
("longlat", _("Geographic"), GeoPanel)]#longlat is an alias of proj |
65 |
self.receiver = receiver |
self.receiver = receiver |
66 |
self.haveTried = False |
self.haveTried = False |
67 |
self.curProjPanel = None |
self.curProjPanel = None |
464 |
self.projchoice.Select(0) |
self.projchoice.Select(0) |
465 |
self.projchoice.Disable() |
self.projchoice.Disable() |
466 |
self._show_proj_panel(UnknownProjPanel) |
self._show_proj_panel(UnknownProjPanel) |
467 |
|
assert self.curProjPanel is not None |
468 |
|
self.curProjPanel.SetProjection(proj) |
469 |
else: |
else: |
470 |
self.projfilepath.SetLabel(_("Multiple Projections selected")) |
self.projfilepath.SetLabel(_("Multiple Projections selected")) |
471 |
|
|
658 |
def __init__(self, parent, receiver): |
def __init__(self, parent, receiver): |
659 |
ProjPanel.__init__(self, parent) |
ProjPanel.__init__(self, parent) |
660 |
|
|
661 |
|
self.__text = _("Thuban does not know the parameters\n" |
662 |
|
"for the current projection and cannot\n" |
663 |
|
"display a configuration panel.\n\n" |
664 |
|
"The unidentified set of parameters is:\n\n") |
665 |
|
|
666 |
|
self.__textbox = wxTextCtrl(self, -1, self.__text, size=(100,200), |
667 |
|
style=wxTE_READONLY|wxTE_MULTILINE|wxTE_LINEWRAP) |
668 |
self._DoLayout() |
self._DoLayout() |
669 |
|
|
670 |
def _DoLayout(self): |
def _DoLayout(self): |
671 |
sizer = wxBoxSizer(wxVERTICAL) |
sizer = wxBoxSizer(wxVERTICAL) |
672 |
|
|
673 |
sizer.Add(wxStaticText(self, -1, |
sizer.Add(self.__textbox, 0, wxALL|wxEXPAND, 4) |
|
_("Thuban does not know the parameters\n" |
|
|
"for the current projection and cannot\n" |
|
|
"display a configuration panel."))) |
|
674 |
|
|
675 |
ProjPanel._DoLayout(self, sizer) |
ProjPanel._DoLayout(self, sizer) |
676 |
|
|
678 |
return "Unknown" |
return "Unknown" |
679 |
|
|
680 |
def SetProjection(self, proj): |
def SetProjection(self, proj): |
681 |
pass |
"""Append the available parameters to the info text.""" |
682 |
|
text = self.__text |
683 |
|
for param in proj.GetAllParameters(): |
684 |
|
text = text + '%s\n' % param |
685 |
|
self.__textbox.SetValue(text) |
686 |
|
|
687 |
def GetParameters(self): |
def GetParameters(self): |
688 |
return None |
return None |