项目作者: brazil-data-cube

项目描述 :
R Client Library for Land Cover Classification System Web Service
高级语言: R
项目地址: git://github.com/brazil-data-cube/rlccs.git
创建时间: 2021-02-10T17:31:33Z
项目社区:https://github.com/brazil-data-cube/rlccs

开源协议:MIT License

下载


rlccs - R Client Library for Land Cover Classification System Web Service

Software
License
Software Life
Cycle
Join us at
Discord

About

Currently, there are several data sets on regional, national and global
scales with information on land use and land cover that aim to support a
large number of applications, including the management of natural
resources, climate change and its impacts, and biodiversity
conservation. These data products are generated using different
approaches and methodologies, which present information about different
classes of the earth’s surface, such as forests, agricultural
plantations, among others. Initiatives that generate land use and land
cover maps normally develop their own classification system, with
different nomenclatures and meanings of the classes used.

As more data on land use and land cover are made available, there are
also greater variations in the class definitions of these maps.
Significant obstacles arise in the joint use of these data. It demands
great effort from researchers, students and specialists to carry out
comparative analyzes and validations of different maps of land use and
cover and with different ones that have different classification
systems. There are several studies and techniques that aim to verify the
similarity between classes in order to obtain harmonized classification
systems and thus carry out joint analyzes of different mapping products.

In this context, the Land Cover Classification System
Web Service (LCCS-WS) aims to provide a simple interface to
access the various classification systems in use and their respective
classes. Therefore, this service proposes a representation for the
classification systems and provides an API to access the classes and
their symbolization. It is also possible to establish mappings between
classes of different systems.

If you want to know more about LCCS service, please, take a look at its
specification.

Installation

To install the development version of rlccs, run the following
commands:

  1. # load necessary libraries
  2. library(devtools)
  3. install_github("brazil-data-cube/rlccs")

Importing rlccs package:

  1. library(rlccs)
  2. library(magrittr) # for pipe (%>%) in examples

Usage

The following are an overview of some operations implemented by rlccs:

LCCS-WS operations rlccs functions
/classification_systems classification_systems()
/classification_systems/{system_id}/classes classes()
/classification_system/{system_id}/styles/{style_format_id} styles()
/mappings/{system_id_source}/{system_id_target} mappings()

These functions can be used to retrieve information from a LCCS-WS
service.

The code bellow list the available classification system of the LCCS-WS
of the Brazil Data Cube project of the
Brazilian National Space Research Institute INPE.

  1. lccs("https://brazildatacube.dpi.inpe.br/dev/lccs/") %>%
  2. classification_systems() %>%
  3. get_request()
  4. #> [[1]]
  5. #> [[1]]$authority_name
  6. #> [1] "INPE"
  7. #>
  8. #> [[1]]$description
  9. #> [1] "Brazil Data Cube Project "
  10. #>
  11. #> [[1]]$id
  12. #> [1] 1
  13. #>
  14. #> [[1]]$links
  15. #> [[1]]$links[[1]]
  16. #> [[1]]$links[[1]]$href
  17. #> [1] "https://brazildatacube.dpi.inpe.br/dev/lccs/classification_systems/1"
  18. ...

In the code bellow, we get the metadata of a specific classification
system:

  1. lccs("https://brazildatacube.dpi.inpe.br/dev/lccs/") %>%
  2. classification_systems(system_id = 2) %>%
  3. get_request()
  4. #> $authority_name
  5. #> [1] "INPE"
  6. ...
  7. #> $links[[6]]
  8. #> $links[[6]]$href
  9. #> [1] "https://brazildatacube.dpi.inpe.br/dev/lccs/"
  10. #>
  11. #> $links[[6]]$rel
  12. #> [1] "root"
  13. #>
  14. #> $links[[6]]$title
  15. #> [1] "API landing page."
  16. #>
  17. #> $links[[6]]$type
  18. #> [1] "application/json"
  19. ...

This example shows the classes of a specific classification system:

  1. lccs("https://brazildatacube.dpi.inpe.br/dev/lccs/") %>%
  2. classification_systems(system_id = 2) %>%
  3. classes() %>%
  4. get_request()
  5. #> [[1]]
  6. #> [[1]]$href
  7. #> [1] "https://brazildatacube.dpi.inpe.br/dev/lccs/classification_systems/2/classes"
  8. ...
  9. #>
  10. #>
  11. #> [[4]]
  12. #> [[4]]$href
  13. #> [1] "https://brazildatacube.dpi.inpe.br/dev/lccs/"
  14. #>
  15. #> [[4]]$rel
  16. #> [1] "root"
  17. #>
  18. #> [[4]]$title
  19. #> [1] "API landing page"
  20. #>
  21. #> [[4]]$type
  22. #> [1] "application/json"
  23. #>
  24. #>
  25. #> [[5]]
  26. #> [[5]]$href
  27. #> [1] "https://brazildatacube.dpi.inpe.br/dev/lccs/classification_systems/2/classes/51"
  28. #>
  29. ...

License

  1. Copyright (C) 2021 INPE.
  2. R client for LCCS-WS is free software; you can redistribute it and/or modify it
  3. under the terms of the MIT License; see LICENSE file for more details.