當前位置: 首頁>>代碼示例>>Python>>正文


Python QgsGenericProjectionSelector.setSelectedAuthId方法代碼示例

本文整理匯總了Python中qgis.gui.QgsGenericProjectionSelector.setSelectedAuthId方法的典型用法代碼示例。如果您正苦於以下問題:Python QgsGenericProjectionSelector.setSelectedAuthId方法的具體用法?Python QgsGenericProjectionSelector.setSelectedAuthId怎麽用?Python QgsGenericProjectionSelector.setSelectedAuthId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在qgis.gui.QgsGenericProjectionSelector的用法示例。


在下文中一共展示了QgsGenericProjectionSelector.setSelectedAuthId方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: browseCRS

# 需要導入模塊: from qgis.gui import QgsGenericProjectionSelector [as 別名]
# 或者: from qgis.gui.QgsGenericProjectionSelector import setSelectedAuthId [as 別名]
 def browseCRS(self):
     selector = QgsGenericProjectionSelector()
     selector.setSelectedAuthId(self.crs)
     if selector.exec_():
         authId = selector.selectedAuthId()
         if authId.upper().startswith("EPSG:"):
             self.crs = authId
         else:
             proj = QgsCoordinateReferenceSystem()
             proj.createFromSrsId(selector.selectedCrsId())
             self.crs = proj.toProj4()
         self.updateText()
開發者ID:liminlu0314,項目名稱:QGIS,代碼行數:14,代碼來源:CrsSelectionPanel.py

示例2: CRSButton

# 需要導入模塊: from qgis.gui import QgsGenericProjectionSelector [as 別名]
# 或者: from qgis.gui.QgsGenericProjectionSelector import setSelectedAuthId [as 別名]
class CRSButton(QPushButton) :

    def __init__(self) :
        super(QPushButton, self).__init__()
        self.crsDialog = QgsGenericProjectionSelector()
        QObject.connect(self, SIGNAL("clicked()"), self.crsDialog.exec_)
        QObject.connect(self, SIGNAL("clicked()"), self.update)
        self._crs = None

    def crs(self) :
        return self._crs

    def setCrs(self, cr) :
        self._crs = cr
        self.setText(cr.description())
        self.crsDialog.setSelectedAuthId(cr.authid())

    def update(self) :
        self.setCrs(QgsCoordinateReferenceSystem(self.crsDialog.selectedAuthId()))
開發者ID:ccorail,項目名稱:qgis-gmsh,代碼行數:21,代碼來源:tools.py

示例3: geomapfishCrsButtonClicked

# 需要導入模塊: from qgis.gui import QgsGenericProjectionSelector [as 別名]
# 或者: from qgis.gui.QgsGenericProjectionSelector import setSelectedAuthId [as 別名]
 def geomapfishCrsButtonClicked(self):
     dlg = QgsGenericProjectionSelector(self)
     dlg.setMessage('Select GeoMapFish CRS')
     dlg.setSelectedAuthId(self.geomapfishCrs.text())
     if dlg.exec_():
         self.geomapfishCrs.setText(dlg.selectedAuthId())
開發者ID:3nids,項目名稱:wincan2qgep,代碼行數:8,代碼來源:configurationdialog.py


注:本文中的qgis.gui.QgsGenericProjectionSelector.setSelectedAuthId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。