GNU General Public License v2.0

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

ConservationInternational/trends.earth : 衡量土地变化的技术解决方案

项目背景与痛点

在当今世界,土地利用变化的影响越来越受到关注。土地变化不仅能影响生态系统,还可能引发一系列环境问题。ConservationInternational/trends.earth 项目旨在提供一个科学工具,帮助用户分析和监测土地变化的过程。通过使用趋势分析技术,trends.earth 提供了一种有效的手段,帮助不同利益相关方掌握土地变化的动态,从而实施相应的保护和管理措施。

核心技术揭秘

架构设计

trends.earth 采用了 Python 语言构建,其架构设计简洁高效,易于维护和扩展。系统主要依赖于地理空间数据处理库如 rasterio 和 geopandas,结合卫星数据进行土地变化的趋势分析。数据处理流程可以从数据获取到趋势分析形成一个完整循环,数据管理的模块化设计确保了系统的灵活性。

graph TD A[数据源] --> B("数据处理") B --> C("数据清洗") C --> D("趋势分析") D --> E{"结果评估"} E -->|"合格"| F[生成报告] E -->|"不合格"| G[回溯优化]

关键组件

  • 数据源 (Data Source):收集来自多种卫星(如 Landsat 和 Sentinel)的多光谱影像数据。
  • 数据处理 (Data Processing):使用开源工具处理下载的原始数据。
  • 数据清洗 (Data Cleaning):通过算法去除数据中的噪声和异常值。
  • 趋势分析 (Trend Analysis):利用时间序列分析技术进行土地变化分析。
  • 结果评估 (Evaluation):对分析结果进行验证,决定是否生成报告或是回溯优化数据处理流程。

功能亮点与差异

与其他的土地变化监测工具相比,trends.earth 的独特之处在于其开放性与易用性。项目欢迎社区贡献,支持多种地理空间数据格式,可以快速适应不同地区和应用场景的需求。更进一步的是,它能够提供细致的土地变化分析报告,不仅关注变化的趋势,还考虑了影响变化的环境因素。

应用场景与落地建议

在生产环境中使用 trends.earth,需要确保拥有稳定的卫星数据来源。数据的质量直接影响土地变化趋势分析的准确性,数据清洗和处理的能力是关键。该工具适合于环境监测机构、土地规划部门等需长期关注土地利用情况的场景。

综合评价

trends.earth 在土地变化分析领域展示了强大的功能,其开放源代码和跨平台支持使得工具能够迅速响应用户需求。然而,系统的性能依赖于数据处理的效率,以及用户理解地理空间数据分析的难度。选择这样的工具时,需要考虑到技术团队的技术支持能力和数据获取的成本。

关于

GitHub 原始描述(英文)

trends.earth - measure land change

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

Dockerfile
Jupyter Notebook
Nix
PowerShell
Python
QML
QMake
Shell
XSLT

Release

README

Trends.Earth

Trends.Earth

Documentation Zipfile Translations Tests Documentation PDFs

Trends.Earth is a free and open source tool to understand land change: the how and why behind changes on the ground. Trends.Earth allows users to draw on the best available information from across a range of sources - from globally available data to customized local maps. A broad range of users are applying Trends.Earth for projects ranging from planning and monitoring restoration efforts, to tracking urbanization, to developing official national reports for submission to the United Nations Convention to Combat Desertification (UNCCD).

Trends.Earth is a QGIS plugin that supports monitoring of land change, including trends in urbanization, and changes in productivity, land cover, and soil organic carbon. The tool can support monitoring land degradation for reporting to the Global Environment Facility (GEF) and United Nations Convention to Combat Desertification (UNCCD), as well as tracking progress towards achievement of Sustainable Development Goal (SDG) target 15.3, Land Degradation Neutrality (LDN).

Trends.Earth was produced by a partnership of Conservation International, Lund University, and the National Aeronautics and Space Administration (NASA), with the support of the Global Environment Facility (GEF). It was further developed through a partnership with Conservation International, University of Bern, University of Colorado in partnership with USDA and USAID, University of California - Santa Barbara in partnership with University of North Carolina - Wilmington and Brown University with additional funding from the Global Environment Facility (GEF).

Documentation

See the user guide for information on how to use the plugin.

Installation of stable version of plugin

The plugin requires Python 3.12 or newer, including the Python runtime bundled with QGIS.

The easiest way to install the plugin is from within QGIS, using the QGIS plugin repository. However, It is also possible to install the plugin manually from a zipfile, which can be useful to access an old version of the plugin, or to install the plugin without internet. Instructions for both of these possibilities are below.

The easiest way to install the plugin is from within QGIS, using the QGIS plugin repository.

Stable version from zipfile

Download a stable version of Trends.Earth from the list of available releases on GitHub. Then follow the instructions below on installing the plugin from a zipfile.

Installation from custom QGIS plugin repository

In addition to the official QGIS plugin repository, Trends.Earth maintains several custom QGIS plugin repositories that provide access to both the latest stable release and pre-release (development) builds. These repositories are updated automatically.

There are two repository URLs, one for release builds, another for development builds.

Release builds

Release builds are updated on every GitHub release and on every version tag push. Use this link:

https://raw.githubusercontent.com/ConservationInternational/trends.earth/release/docs/repository/plugins.xml

Development builds

Development builds are updated on every push to main, and so will always have the latest features and bug fixes, but without the same level of testing as the release builds. Use this link to use development builds:

https://raw.githubusercontent.com/ConservationInternational/trends.earth/release/docs/repository/dev/plugins.xml

Adding a custom repository to QGIS

  1. Open QGIS.
  2. Go to Plugins → Manage and Install Plugins.
  3. Click the Settings tab.
  4. Under Plugin repositories, click Add…
  5. Enter a name (e.g. Trends.Earth releases) and paste one of the URLs listed above (for release or development builds) into the URL field.
  6. Click OK. QGIS will fetch the repository and it will appear in the list with a green status indicator.

Installing the plugin from a custom repository

  1. After adding the repository, click the All tab (or Not installed if you have not yet installed the plugin).
  2. Search for Trends.Earth.
  3. Select the plugin and click Install Plugin (or Upgrade Plugin if upgrading an existing installation).
  4. Click Close and restart QGIS if prompted.

To access development builds, make sure Show also experimental plugins is checked under the Settings tab before searching.

Installation of development version of plugin

If you are interested in using the development version of the plugin, with the very latest (but not as well tested) features, or in contributing to the development of it, you will want to install the development version. Note that the development version is more likely to contain bugs or other issues that have yet to be resolved. There are three ways to install the development version:

It is easier to install the plugin from a zipfile than from github, so this option is recommended unless you are interested in contributing to development of the plugin.

Development version from zipfile

Download the latest Trends.Earth zipfile. Then follow the instructions below on installing the plugin from a zipfile.

QGIS3+ is required for the latest versions of Trends.Earth. The QGIS2 version is no longer supported (support ended in March 2020). If you want to use a previous version of Trends.Earth (e.g. versions that work with QGIS2), please refer to this repository where all Trends.Earth releases are available.

Development version from source

Open a terminal window and clone the latest version of the repository from Github:

git clone https://github.com/ConservationInternational/trends.earth

Navigate to the root folder of the newly cloned repository, and install invoke, a tool that assists with installing the plugin:

pip install invoke

Now run the setup task with invoke to pull in the external dependencies needed for the project:

invoke plugin-setup

then you can install the plugin using invoke:

invoke plugin-install --profile=<profile name>

If you modify the code, you need to run invoke plugin-install to update the installed plugin in QGIS. You only need to rerun invoke plugin-setup if you change or update the plugin dependencies. After reinstalling the plugin you will need to restart QGIS or reload the plugin. Install the “Plugin reloader” plugin if you plan on making a log of changes (https://github.com/borysiasty/plugin_reloader).

Installing plugin from a zipfile

While installing trends.earth directly from within QGIS is recommended, it might be necessary to install the plugin from a zipfile if you need to install it offline, or if you need the latest features.

To install from a zipfile, first download a zipfile of the stable version. The zipfile might be named LDMP.zipor LDMP_QGIS3.zip depending on what version you are installing.

To install trends.earth from a zipfile, open QGIS and click on “Plugins” then on “Manage and install plugins” and choose the option “Install from ZIP”. Browse to the folder in which the zipfile has been saved, select the zipfile and click on ‘Install Plugin’. Do not unzip the file

Please, note that the latest version of trends.earth is only supported for QGIS3.40 or greater versions.

Start QGIS, and click on “Plugins” then “Manage and install plugins”. In the plugins window that appears, click on “Installed”, and then make sure there is a check in the box next to “Trends.Earth”. The plugin is now installed and activated. Click “Close”, and start using the plugin.

Getting help

General questions

If you have questions related to the methods used by the plugin, how to use a particular dataset or function, etc., it is best to first check the user guide to see if your question is already addressed there. The frequently asked questions (FAQ) page is another good place to look.

If you don’t find your answer in the above pages, you can also contact the discussion group.

Reporting an issue (error, possible bug, etc.)

If you think you have found a bug in Trends.Earth, report your issue to our issue tracker so the developers can look into it.

When you report an issue, be sure to provide enough information to allow us to be able to reproduce it. In particular, be sure to specify:

  • What you were doing with the plugin when the problem or error occurred (for example “I clicked on ‘Download Results’ and got an error messaging saying the message said`”.
  • The operating system you are using, version of the plugin are you using, and version of QGIS that you are using
  • If you are emailing about an error or problem that occurred when downloading results, tell us your username, and the task start time that is listed in the download tool for the task you are referring to
  • If the error occurred while processing data with the plugin, tell us the location you were analyzing with the tool (for example: “I selected Argentina from the dropdown menu”). If you used your own shapefile, please send us the file you used.
  • If you got a message saying “An error has occurred while executing Python code”, send us either the text of the message, or a a screenshot of the error message. Also, send us the content of the Trends.Earth log messages panel. To access the Trends.Earth log messages panel, select “View”, then “Panels”, then “Log Messages” from within QGIS. Copy and paste the text from that panel and include it in your issue report. It will make it easiest for us to track things down (as there will be fewer log messages) if you do this after first starting a new QGIS session and immediately reproducing the error.

Contributing

Contributions are welcome. Please report bugs or suggest improvements via the issue tracker. See the Getting help section for additional support options.

Trends.Earth is built from a set of interconnected repositories:

License

Trends.Earth is free and open-source. It is licensed under the GNU General Public License, version 2.0 or later

评论

暂无评论