|
5 | 5 | Python Client Library for the LCCS Web Service is free software; you can redistribute it and/or modify it
|
6 | 6 | under the terms of the MIT License; see LICENSE file for more details.
|
7 | 7 |
|
8 |
| -.. include:: ../../CLI.rst |
| 8 | +Running LCCS Client in the Command Line |
| 9 | +======================================= |
| 10 | + |
| 11 | +If you want to know the LCCS version, use the option ``--version`` as in:: |
| 12 | + |
| 13 | + lccs --version |
| 14 | + |
| 15 | + |
| 16 | +Output:: |
| 17 | + |
| 18 | + lccs, version 0.4.0.post0 |
| 19 | + |
| 20 | + |
| 21 | +To list the available classification systems in a service, use the ``classification-systems`` command and provides a URL to the ``--url`` option:: |
| 22 | + |
| 23 | + lccs --url 'http://brazildatacube.dpi.inpe.br/dev/lccs/' classification-systems |
| 24 | + |
| 25 | + |
| 26 | +The above command will return a list of classification system names as:: |
| 27 | + |
| 28 | + BDC |
| 29 | + IBGE |
| 30 | + PRODES |
| 31 | + MapBiomas5 |
| 32 | + |
| 33 | +To get more information about a specific classification system, use the ``classification-systems-describe`` command:: |
| 34 | + |
| 35 | + lccs --url 'http://brazildatacube.dpi.inpe.br/dev/lccs/' classification-systems-describe --system_id 'PRODES' |
| 36 | + |
| 37 | +Output:: |
| 38 | + |
| 39 | + - authority_name: Projeto de Mapeamento Anual da Cobertura e Uso do Solo no Brasil (MapBiomas) |
| 40 | + - description: O Projeto de Mapeamento Anual da Cobertura e Uso do Solo do Brasil é uma iniciativa que envolve uma rede colaborativa com especialistas nos biomas, usos da terra, sensoriamento remoto, SIG e ciência da computação que utiliza processamento em nuvem e classificadores automatizados desenvolvidos e operados a partir da plataforma Google Earth Engine para gerar uma série histórica de mapas anuais de cobertura e uso da terra do Brasil. |
| 41 | + - id: 32 |
| 42 | + - links: [{'href': 'http://brazildatacube.dpi.inpe.br/dev/lccs/classification_system', 'rel': 'parent', 'title': 'Link to this document', 'type': 'application/json'}, ..] |
| 43 | + - name: Mapbiomas5 |
| 44 | + - version: 5 |
| 45 | + |
| 46 | + |
| 47 | +List the available classes of a classification system, use the ``classes`` command:: |
| 48 | + |
| 49 | + lccs --url 'http://brazildatacube.dpi.inpe.br/dev/lccs/' classes --system_id 'PRODES' |
| 50 | + |
| 51 | +The above command will return a list of classes of PRODES as:: |
| 52 | + |
| 53 | + Desmatamento |
| 54 | + Floresta |
| 55 | + Hidrografia |
| 56 | + Não Floresta |
| 57 | + Nuvem |
| 58 | + Resíduo |
| 59 | + |
| 60 | +To get more information about a specific class, use the ``class-describe`` command:: |
| 61 | + |
| 62 | + lccs --url 'http://brazildatacube.dpi.inpe.br/dev/lccs/' class-describe --system_id 'PRODES' --class_id 'Desmatamento' |
| 63 | + |
| 64 | +The above command will return a:: |
| 65 | + |
| 66 | + - class_parent: None |
| 67 | + - classification_system_id: 4 |
| 68 | + - classification_system_name: PRODES |
| 69 | + - code: DESMATAMENTO |
| 70 | + - description: |
| 71 | + - id: 1 |
| 72 | + - links: [[{'href': 'http://brazildatacube.dpi.inpe.br/dev/lccs/classification_system/PRODES/classes/Desmatamento', 'rel': 'self', 'title': 'Link to this document', 'type': 'application/json'},...] |
| 73 | + - name: Desmatamento |
| 74 | + |
| 75 | + |
| 76 | +Retrieve all available classification system mappings, use the ``available-mappings`` command:: |
| 77 | + |
| 78 | + lccs --url 'http://brazildatacube.dpi.inpe.br/dev/lccs/' available-mappings --system_id_source 'TerraClass_AMZ' |
| 79 | + |
| 80 | +The above command will return a list of classification systems as:: |
| 81 | + |
| 82 | + PRODES |
| 83 | + |
| 84 | + |
| 85 | +To get a mapping between classification systems, use the ``mappings`` command:: |
| 86 | + |
| 87 | + lccs --url 'http://brazildatacube.dpi.inpe.br/dev/lccs/' mappings --system_id_source 'TerraClass_AMZ' --system_id_target 'PRODES' |
| 88 | + |
| 89 | + |
| 90 | +Output:: |
| 91 | + |
| 92 | + Classification Source: TerraClass_AMZ |
| 93 | + Classification Target: PRODES |
| 94 | + {'degree_of_similarity': 1.0, 'description': '', 'links': [{'href': 'http://brazildatacube.dpi.inpe.br/dev/lccs/classification_system/TerraClass_AMZ/classes/Agricultura Anual', 'rel': 'item', 'title': 'Link to the source class', 'type': 'application/json'}, {'href': 'http://brazildatacube.dpi.inpe.br/dev/lccs/classification_system/TerraClass_AMZ/classes/Desmatamento', 'rel': 'item', 'title': 'Link to target class', 'type': 'application/json'}], 'source': 'Agricultura Anual', 'source_id': 85, 'target': 'Desmatamento', 'target_id': 175} |
| 95 | + {'degree_of_similarity': 1.0, 'description': '', 'links': [{'href': 'http://brazildatacube.dpi.inpe.br/dev/lccs/classification_system/TerraClass_AMZ/classes/Área Não Observada', 'rel': 'item', 'title': 'Link to the source class', 'type': 'application/json'}, {'href': 'http://brazildatacube.dpi.inpe.br/dev/lccs/classification_system/TerraClass_AMZ/classes/Nuvem', 'rel': 'item', 'title': 'Link to target class', 'type': 'application/json'}], 'source': 'Área Não Observada', 'source_id': 86, 'target': 'Nuvem', 'target_id': 179} |
| 96 | + |
| 97 | +.. note:: |
| 98 | + |
| 99 | + For more information, type in the command line:: |
| 100 | + |
| 101 | + lccs --help |
0 commit comments