• 大小: 416KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2024-01-15
  • 语言: Python
  • 标签: QGIS  GeoHey-Toolb  

资源简介

QGIS插件,地图纠偏工具。解压后放入c:\Users\用户名.qgis2\python\plugins\”这个文件夹

资源截图

代码片段和文件信息

# -*- coding: utf-8 -*-

“““
/***************************************************************************
 GeoHeyProvider
                                 A QGIS plugin
 GeoHey provider info
                              -------------------
        begin                : 2016-10-29
        copyright            : (C) 2016 by GeoHey
        email                : xux@geohey.com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
“““

__author__ = ‘GeoHey‘
__date__ = ‘2016-10-29‘
__copyright__ = ‘(C) 2016 by GeoHey‘

# This will get replaced with a git SHA1 when you do a git archive

__revision__ = ‘$Format:%H$‘

from PyQt4.QtGui import *
from processing.tools.system import *

from processing.core.AlgorithmProvider import AlgorithmProvider
from processing.core.ProcessingConfig import Setting ProcessingConfig
from china_offset.offset_wgs84_algorithm import OffsetWGS84Algorithm
from grid.lambert_grid_algorithm import LambertGridAlgorithm
from china_offset.wgs2gcj import WGS2GCJ
from china_offset.gcj2wgs import GCJ2WGS
from china_offset.gcj2bd import GCJ2BD
from china_offset.bd2gcj import BD2GCJ
from china_offset.wgs2bd import WGS2BD
from china_offset.bd2wgs import BD2WGS

class GeoHeyProvider(AlgorithmProvider):

    MY_DUMMY_SETTING = ‘MY_DUMMY_SETTING‘

    def __init__(self):
        AlgorithmProvider.__init__(self)

        # Deactivate provider by default
        self.activate = False

        # Load algorithms
        self.alglist = [WGS2GCJ()  GCJ2BD() BD2GCJ() WGS2BD()  LambertGridAlgorithm()]
        for alg in self.alglist:
            alg.provider = self

    def initializeSettings(self):
        “““In this method we add settings needed to configure our
        provider.

        Do not forget to call the parent method since it takes care
        or automatically adding a setting for activating or
        deactivating the algorithms in the provider.
        “““
        AlgorithmProvider.initializeSettings(self)
        ProcessingConfig.addSetting(Setting(‘Example algorithms‘
            GeoHeyProvider.MY_DUMMY_SETTING
            ‘Example setting‘ ‘Default value‘))

    def unload(self):
        “““Setting should be removed here so they do not appear anymore
        when the plugin is unloaded.
        “““
        AlgorithmProvider.unload(self)
        ProcessingConfig.removeSetting(
            Geo

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-10-12 09:51  GeoHey-Toolbox\
     文件        6148  2017-10-12 09:51  GeoHey-Toolbox\.DS_Store
     目录           0  2017-10-18 20:04  __MACOSX\
     目录           0  2017-10-18 20:04  __MACOSX\GeoHey-Toolbox\
     文件         120  2017-10-12 09:51  __MACOSX\GeoHey-Toolbox\._.DS_Store
     文件        1300  2017-10-18 20:04  GeoHey-Toolbox\metadata.txt
     文件         176  2017-10-18 20:04  __MACOSX\GeoHey-Toolbox\._metadata.txt
     文件        1659  2017-10-11 21:40  GeoHey-Toolbox\geohey.png
     文件        1751  2017-10-11 23:22  GeoHey-Toolbox\geohey_toolbox.py
     文件        1527  2017-10-11 15:35  GeoHey-Toolbox\__init__.py
     文件        4295  2017-10-18 19:55  GeoHey-Toolbox\geohey_provider.py
     文件         695  2017-10-18 19:56  GeoHey-Toolbox\README.md
     目录           0  2017-10-12 09:52  GeoHey-Toolbox\china_offset\
     文件        7654  2017-10-11 21:53  GeoHey-Toolbox\china_offset\gcj2bd.py
     文件        1659  2017-10-11 21:50  GeoHey-Toolbox\china_offset\geohey.png
     文件           0  2017-10-11 15:35  GeoHey-Toolbox\china_offset\__init__.py
     文件        7653  2017-10-11 21:53  GeoHey-Toolbox\china_offset\bd2wgs.py
     文件        7661  2017-10-12 00:31  GeoHey-Toolbox\china_offset\wgs2gcj.py
     文件        7661  2017-10-11 21:53  GeoHey-Toolbox\china_offset\gcj2wgs.py
     文件        7652  2017-10-11 21:53  GeoHey-Toolbox\china_offset\wgs2bd.py
     文件        4683  2017-10-12 00:26  GeoHey-Toolbox\china_offset\transform.py
     文件        6821  2017-10-11 17:46  GeoHey-Toolbox\china_offset\offset_wgs84_core.py
     文件        7658  2017-10-11 21:52  GeoHey-Toolbox\china_offset\bd2gcj.py
     文件        7397  2017-10-11 21:53  GeoHey-Toolbox\china_offset\offset_wgs84_algorithm.py
     目录           0  2017-10-11 15:35  GeoHey-Toolbox\doc\
     文件      139554  2017-10-11 15:35  GeoHey-Toolbox\doc\enable_tool.png
     文件      250911  2017-10-11 15:35  GeoHey-Toolbox\doc\enable_plugin.png
     目录           0  2017-10-18 20:04  GeoHey-Toolbox\.git\
     文件         365  2017-10-12 09:50  GeoHey-Toolbox\.git\config
     目录           0  2017-10-12 09:53  GeoHey-Toolbox\.git\objects\
     目录           0  2017-10-12 09:53  GeoHey-Toolbox\.git\objects\50\
............此处省略97个文件信息

评论

共有 条评论