Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Atlantic Forest Biome
ATBD_R Algorithm Theoretical Basis Document & Results
December, 2017
EXECUTIVE SUMMARY
This ATBD_R is a dynamic and evolving document. Each time we launch a new
collection, this document will be revised accordingly.
By reading the document one should understand how the collection of maps were
produced, what were the utilized datasets and methodological approaches and what
were the rationale and theory behind these approaches.
Atlantic Forest Team
General Coordinator
Marcos Reis Rosa
Biome Coordinator
Fernando F. Paternost
Team
Viviane C. Mazin
Jacqueline Freitas
Eduardo R. Rosa
Table of Contents
EXECUTIVE SUMMARY ................................................................................................................ 2
List of Tables ............................................................................................................................... 4
1. Introduction......................................................................................................................... 5
1.1. Identification of Region of Interest .............................................................................. 5
2. Overview and Background Information .............................................................................. 6
2.1. Existent Maps and Mapping Initiatives........................................................................ 6
3. Algorithm Descriptions, Assumptions, and Approaches ................................................... 10
3.1. Algorithm description ................................................................................................ 10
3.2. Collection 1 ................................................................................................................ 13
3.2.1. Data availability and screening ........................................................................... 13
3.2.2. Classification scheme and parameters ............................................................... 16
3.2.3. Data volumes and processing issues .................................................................. 19
3.2.4. Preliminary Result Analyze ................................................................................. 19
3.2.5. Final processing .................................................................................................. 22
3.3. Collection 2 ................................................................................................................ 23
3.3.1. Algorithm ............................................................................................................ 23
3.3.2. Data availability and screening ........................................................................... 24
3.3.3. Classification scheme and parameters ............................................................... 27
3.3.4. Decision Tree ...................................................................................................... 30
3.3.4. Temporal Filter ................................................................................................... 33
3.3.4. Data volumes and processing issues .................................................................. 38
3.3.4. Collection 2.3 ...................................................................................................... 38
4. Validation Strategies ......................................................................................................... 40
5. Concluding Remarks and Perspectives ............................................................................. 43
6. References ......................................................................................................................... 44
7. Appendices ........................................................................................................................ 44
9.1. Algorithm Code ......................................................................................................... 44
9.2. Supplemental Material ............................................................................................. 50
List of Figures
Figure 1. Biomes of Brazil (IBGE, 2004)............................................................................................................. 6
Figure 2. Map from “Atlas dos Remanescentes Florestais da Mata Atlântica, 2013-2014” ............................... 7
Figure 3. IBAMA´s Atlantic Forest monitoring website ..................................................................................... 8
Figure 4. Grids 1:250.000 in Atlantic Forest Biome ..........................................................................................10
Figure 5. Activity flow chart to produce Biome classification ..........................................................................11
Figure 6. Activity flow chart to produce Final classification .............................................................................11
Figure 7. Quality of each map mosaic in collection 1 .......................................................................................14
Figure 8. Endmembers candidates (gray) and median (dashed line) to GV, NPV, Soil and Shade endmembers
(SOUZA; ROBERTS; COCHRANE, 2005) ...................................................................................................14
Figure 9. NDFI mosaic for each year in collection 1 .........................................................................................15
Figure 10. Decision tree in collection 1 (green arrow equal YES and red arrow equal NO) ..............................16
Figure 11. Regions used to divide Atlantic Forest Biome .................................................................................16
Figure 12. Values for each variable to each region from 2008 to 2015 ............................................................17
Figure 13. Spatial Filter applied to Collection 1 ...............................................................................................17
Figure 14. Forest classification after spatial filter from 2008 to 2015 ..............................................................18
Figure 15. General rules to temporal filter for all biomes................................................................................18
Figure 16. MapBiomas forest classification of SP compared with reference maps ........................................20
Figure 17. Consistency Analyze .......................................................................................................................20
Figure 18. Statistics of forest for each year at each Brazilian federation unit .................................................21
Figure 19. Frequency Analysis .........................................................................................................................21
Figure 20. Forest final product and statistics ...................................................................................................22
Figure 21. Collection 1 Final product ...............................................................................................................22
Figure 22. Regions used to divide Atlantic Forest Biome .................................................................................25
Figure 23. Mosaic quality of each grid in each year in collection 2 ..................................................................26
Figure 24. Decision Tree to Atlantic Forest Biome ...........................................................................................30
Figure 25. Temporal rule explanation .............................................................................................................34
Figure 26. Confusion matrix from MapBiomas col 2.3 and FBDS states ...........................................................40
Figure 27. Distribution of 667 validation points ..............................................................................................41
Figure 28. Images of the same pixel from 2000 to 2016 ..................................................................................42
Figure 29. Example of confusion matrix and omission, commission and total accuracy ..................................42
Figure 28. Location of savanna in Atlantic Forest Biome .................................................................................43
List of Tables
Table 1. Table with Satellite/Sensor and GEE Data Set for each year in Collection 1 .......................................13
Table 2. Table with Satellite/Sensor and GEE Data Set for each year in Collection 2 .......................................24
Table 3. Table of initial and final month for each region: ................................................................................25
Table 4. General Rules: In case of “Not observed” repeat the last valid class:.................................................35
Table 5. General Rules: Invalid transitions ......................................................................................................36
Table 6. General Rule: Invalid regeneration with kernel 5 years .....................................................................37
Table 7. Rules to First year ..............................................................................................................................37
Table 8. Rules to Last year ..............................................................................................................................38
1. Introduction
1.1. Identification of Region of Interest
The Atlantic Forest Biome covered an area equivalent to 1,315,460 km2 and originally
extended over 17 Brazilian states.
Today, based on SOS Mata Atlântica1 map, there remain 8.5% of well-preserved forest
remnants over 100 hectares of what originally existed. Summed up all fragments of
native forest above 3 hectares, we currently have 12.5%.
This forest is a global Hotspot, one of the richest and most endangered areas on the
planet, and also declared a Biosphere Reserve by Unesco and National Patrimony, in
the Brazilian Federal Constitution of 1988. Almost 72% of the Brazilian population
currently lives in the Atlantic Rainforest Biome.
The project use as reference the “MAPA DE BIOMAS DO BRASIL – Primeira
Aproximação”, produced by IBGE2, 2004 and published in scale 1:5.000.000.
1 SOS Mata Atlântica is Brazilian NGO responsible to map Atlantic Forest Biome 2 IBGE – Geographic and Statistical Brazilian Institute
Figure 1. Biomes of Brazil (IBGE, 2004)
2. Overview and Background Information
2.1. Existent Maps and Mapping Initiatives
The Atlantic forest biome has three major mapping and monitoring initiatives. The
most important monitoring initiative is “Atlas dos Remanescentes Florestais da Mata
Atlântica” executed by SOS Mata Atlântica and INPE3. It produces periodical
deforestation data and maps since 1985. Since 2000 the initiative use visual
interpretation of Landsat images at 1:50,000 scale.
3 INPE (Instituto Nacional de Pesquisas Espaciais) - Brazilian National Institute
of Space Research
Figure 2. Map from “Atlas dos Remanescentes Florestais da Mata Atlântica, 2013-2014”
The Brazilian Environment Ministry has also an important initiate called PROBIO4 that
produced a map of Atlantic Forest biome landcover in 2002 at 1:250,000 scale. This
product was detailed and used to identify deforestation in 2008 and 2009 by IBAMA5.
4 PROBIO (Projeto de Conservação e Utilização Sustentável da Diversidade
Biológica Brasileira) – Project of Conservation and Sustainable Management of
Biological Diversity 5 IBAMA (Instituto Brasileiro do Meio Ambiente e dos Recursos Naturais
Renováveis) - Brazilian Institute of Environment and Renewable Natural Resources
Figure 3. IBAMA´s Atlantic Forest monitoring website
FBDS6 has a mapping project to support CAR7 in Atlantic Forest and Cerrado. The
project aims to measure the environmental liabilities in APP8 area of water bodies,
following the rules contained in the Law on Protection of Native Vegetation (or New
Forest Code, Law 12.651 / 2012). FBDS performs vistual interpretation over high
resolution images from RapidEye (1: 20,000), producing the natural vegetation, forest
cover and the drainage network mapping and spatializing APP areas that must be
recovered.
By the end of July 2016, data analyzed for 1800 Brazilian municipalities in Atlantic Forest
and Cerrado biomes had already been shared with Federal Government. The project is
financed by federations and private sector associations9, based on a technical
cooperation agreement signed with the Ministry of Environment and the EMBRAPA10.
The land cover map is based on images from 2010, 2011 or 2012. It’s very detailed map
and one of the best reference to check the consistence of MapBiomas product to
Atlantic Forest.
6 FBDS - Fundação Brasileira para o Desenvolvimento Sustentável - Brazilian
NGO 7 CAR - Cadastro Ambiental Rural - National register of rural landowners 8 APP – Área de Preservação Permanente - Permanent preservation area 9 FEBRABAN, IBÁ, SRB, AGROICONE, ABAG, FENASEG, UNICA and Instituto Aço
Brasil 10 EMBRAPA - Empresa Brasileira de Pesquisa Agropecuária - Brazilian
Agricultural Research Enterprise
3. Algorithm Descriptions, Assumptions, and Approaches
3.1. Algorithm description
The mapping process is based on the automatic classification of Landsat images
structured on an empirical classification tree applied to the best images mosaic. The
process is performed using cloud computing through the Google Earth Engine
Platform (GEE) accessed via two interfaces: code editor (native from GEE) and
workspace (developed for the MapBiomas Project)11.
The region on scope is subdivided in charts of 1o Long x 1,5o Latitude (equivalent to
www x yyyy km) forming a 1:250.000 standards map unit used by IBGE.
Figure 4. Grids 1:250.000 in Atlantic Forest Biome
Each chart is processed independently for each year in five steps: (i) produce mosaic of
Landsat images; (ii) classify each pixel based on an empirical decision tree; (iii) perform
special filter; (iv) perform temporal filter; (v) quality analyses.
11 A detailed explanation of the operation of the platforms can be found at the
MapBiomas Master ATBD available at mapbiomas.org
In the steps (i) and (ii) the parameters are specified for eath chart independently and
for for the (iii) and (iv) the parameters are valid for all biome.
Once performed the quality analyses for spatial and temporal consistency the
parameters the parameters can be adjusted and new runs of the steps above can be
performed.
Figure 5. Activity flow chart to produce Biome classification
The values of each node of the classification tree may be parameterized independently
for each 1:250,000 grid and each year to allow the necessary adjustments to avoid
variations due to seasonality, lighting, humidity or the sensor itself.
The classification tree nodes can be defined based on the values or reflectance indices
of each pixel, on the fractions of the composition of each pixel or on additional
information such as elevation, slope or aspect.
Figure 6. Activity flow chart to produce Final classification
After the biome classification, a spatial filter is applied to remove isolated pixels. A
temporal filter with a 3 or 5-year kernel is also applied to avoid impossible changes of
classes and the product is integrated with other themes (pasture, agriculture, etc.) to
produce the final land cover map.
With the project development the mapping will incorporate more years, aiming to map
since 1985 (first Landsat images with resolution of 30m) and a greater detailing of the
legend.
3.2. Collection 1
3.2.1. Data availability and screening
Collection 1 mapped only Forest and non-Forest classes from 2008 to 2015 using
LandSat images.
Table 1. Table with Satellite/Sensor and GEE 12Data Set for each year in Collection 1
2008 TM / Landsat 5 LT5_L1T_SR
2009 TM / Landsat 5 LT5_L1T_SR
2010 TM / Landsat 5 LT5_L1T_SR
2011 TM / Landsat 5 LT5_L1T_SR
2012 ETM / Landsat 7 LE7_L1T_SR
2013 OLI / Landsat 8 LC8_L1T_TOA
2014 OLI / Landsat 8 LC8_L1T_TOA
2015 OLI / Landsat 8 LC8_L1T_TOA
The mosaics for each year was produced initially considering the median of valid pixels
from August, September and October.
Each mosaic was analyzed and the period was adjusted considering a maximum of 6-
month interval.
12 GEE – Google Earth Engine
Figure 7. Quality of each map mosaic in collection 1
Each mosaic was used to create the SMA 13 and fractions of GV14, NPV15, SOIL and
SHADE.
Figure 8. Endmembers candidates (gray) and median (dashed line) to GV, NPV, Soil and Shade
endmembers (SOUZA; ROBERTS; COCHRANE, 2005)
The NDFI 16 was created based on the fraction and it was used as the main reference
to classify the forest.
and
13 SMA - Spectral Mixture Model 14 GV - Green Vegetation 15 NPV - Non Photosynthetic Vegetation 16 NDFI - Normalized Fraction Difference Index
2008 2009 2010
2011 2012 2013
2014 2015
Figure 9. NDFI mosaic for each year in collection 1
3.2.2. Classification scheme and parameters
The decision tree was built with 4 variables that were parametrized for each grid and
each year:
Figure 10. Decision tree in collection 1 (green arrow equal YES and red arrow equal NO)
All biomes used the same decision tree but each one used different values to split each
node. Water class was generated from fmask algorithm.
The Atlantic Forest Biome was divided in 11 regions based on similar vegetation, land
cover and latitude.
Figure 11. Regions used to divide Atlantic Forest Biome
These regions were used to identify the basic parameters that were used as initial value
in each grid:
Figure 12. Values for each variable to each region from 2008 to 2015
After the classification of Forest and Non-Forest a Spatial Filter was applied to fill gaps
and remove isolated pixels.
Figure 13. Spatial Filter applied to Collection 1
The spatial filter produced a map of forest for each year.
Figure 14. Forest classification after spatial filter from 2008 to 2015
After the Spatial Filter a Temporal Filter was applied to remove invalid changes in the
period. The basic concept is to avoid some errors like the example:
2008: Forest – 2009: Non-Forest – 2010: Forest = 2009 corrected to Forest
2008: Non-Forest – 2009: Forest – 2010: Non-Forest = 2009 corrected to Non-Forest
The general rules applied to Temporal Filter are:
Figure 15. General rules to temporal filter for all biomes
3.2.3. Data volumes and processing issues
The collection 1 mapped 8 years (2008 to 2015) in 122 charts.
After the parameterization of the best period for each year and the best parameters
for each variable the processing time to generate cloud free mosaic and classification
took about 3 weeks in Google Earth Engine.
The product was revised and the parameters were corrected when necessary. After this
revision, a new version was produced from scratch and took another 3 weeks to
process.
The products off the process were: (i) RGB landsat based mosaic for each year; (ii)
classification map without temporal filter; (iii) classification map with temporal filter.
3.2.4. Preliminary Result Analyze
After initial classification, the product was analyzed to check the consistency and
quality of the classification.
The preliminary map was compared with reference maps to identify classification
problems.
Figure 16. MapBiomas forest classification of SP compared with reference maps
A visual inspection and statistical data also determined classification difference
between adjacent grids and sequential years.
Figure 17. Consistency Analyze
Figure 18. Statistics of forest for each year at each Brazilian federation unit
The analysis of how many times a pixel was classified as forest in all years also helped
to identify areas where the classification is not consistent.
Figure 19. Frequency Analysis
3.2.5. Final processing
After the refining in parameterization the classification was reprocessed resulting in a
forest classification to Atlantic Forest Biome.
Figure 20. Forest final product and statistics
The Biome classification was integrated with other themes generating the final product,
which is publicly available as collection 1.
Figure 21. Collection 1 Final product
3.3. Collection 2
3.3.1. Algorithm
The algorithm used to classify the land cover in collection 2 was the same used in
collection 1 but each bioma could create its own decision tree or more then one
decision tree in regions if necessary. Landsat images were filtered to identify the best
images and best pixels to produce the mosaic to each year. An empiric classification
tree was used to classify each mosaic using nodes from fractions, fractions index,
reflection index or other information like water and cloud mask, elevation or slope.
After the classification of each year we used the same spatial and temporal filter used
in collection 1 to refine the classification and the maps were integrated with other
themes like pasture, agriculture and coastal vegetation.
Collection 2 has maps from 2000 to 2016 and a more detailed legend tha includes
savannas and grasslands.
3.3.2. Data availability and screening
Collection 2 used Landsat L1T images:
Table 2. Table with Satellite/Sensor and GEE Data Set for each year in Collection 2
Year Sensor/ Satellite GEE Collection
2000 ETM / Landsat 7 LE7_L1T_SR
2001 ETM / Landsat 7 LE7_L1T_SR
2002 ETM / Landsat 7 LE7_L1T_SR
2003 TM / Landsat 5 LT5_L1T_SR
2004 TM / Landsat 5 LT5_L1T_SR
2005 TM / Landsat 5 LT5_L1T_SR
2006 TM / Landsat 5 LT5_L1T_SR
2007 TM / Landsat 5 LT5_L1T_SR
2008 TM / Landsat 5 LT5_L1T_SR
2009 TM / Landsat 5 LT5_L1T_SR
2010 TM / Landsat 5 LT5_L1T_SR
2011 TM / Landsat 5 LT5_L1T_SR
2012 ETM / Landsat 7 LE7_L1T_SR
2013 OLI / Landsat 8 LC8_L1T_TOA
2014 OLI / Landsat 8 LC8_L1T_TOA
2015 OLI / Landsat 8 LC8_L1T_TOA
2016 OLI / Landsat 8 LC8_L1T_TOA
The same regions from collection 1 were used in collection 2 to identify initial and final
month of each grid to build the mosaic.
Figure 22. Regions used to divide Atlantic Forest Biome
Table 3. Table of initial and final month for each region:
Region Initial Final
G1 June September
G2 June August
G3 April August
G4 May August
G5 June September
G6 June September
G7 June September
G8 May September
G9 May September
G10 June October
G11 June November
The mosaic period of each year is then revised on each grid 1:250,000 to verify the
observable area without cloud cover and the general pattern of the image and the
vegetation. The initial and final date of images of each grid are adjusted to correct
problems when possible, extending the period to up to 6 months when necessary or
adding images from dry to wet seasons to harmonize the pattern with other years.
Annex 1: Table with the parameters (start date, end date and cloud cover of each grid
1:250,000 scale for each year.
The figures below show the average quality of the mosaics of each grid 1:250,000 for
each year:
Figure 23. Mosaic quality of each grid in each year in collection 2
3.3.3. Classification scheme and parameters
The collection 2 in Atlantic Forest will have the following classes:
A) Forest
The map was based on the FAO17 definition for Forest:
“Land with tree crown cover (or equivalent stocking level) of more than 10 percent and
area of more than 0.5 hectares (ha). The trees should be able to reach a minimum
height of 5 meters (m) at maturity in situ.”
Natural Forest in the Biome has more tree crown cover then the definition of FAO. We
used a different value for each natural forest formation:
• Dense Ombrophiles Forest - tree crown cover of more than 80%
• Mixed Ombrophiles Forest- tree crown cover of more than 80%
• Open Ombrophiles Forest - tree crown cover of more than 60%
• Seasonal Deciduous Forest- tree crown cover of more than 40% in dry season
• Seasonal Semideciduous Forest- tree crown cover of more than 40% in dry season
Forest in the Biome have high NDFI 18, that’s and index where pixels with greater
fractions of GV and/or SHADE have higher values and pixels with more fractions of NPV
and/or SOIL has lower values.
NDFI to identify forest in the Biome has a mean value of 185. This value is lower in
Deciduous or Semideciduous Forest as they naturally have less tree crown cover.
After the identification of Forest the sum of SOIL and NPV fractions is used to split it in
two different classes:
A1) Dense Forest
Forest with no or few signs of human alteration. The sum of SOIL and NPV fractions is
low then 8 (mean value). In Deciduous and Semideciduous Forest this value is higher
as they naturally have less tree crown cover and more NPV and SOIL.
17 FAO - Food and Agriculture Organization of the United Nations 18 NDFI – Normalized Difference Fraction Index
Open Forest
Forest with higher values of the sum of SOIL and NPV fractions.
Planted forest is also classified as dense forest and they are identified as separated
from Natural Forest in the integration procedure. When its cut or during the grow
stage, the planted forest is classified as farming.
The greatest difficulty of the Atlantic Forest Biome are the non-forest areas, mainly
agriculture, which are erroneously classified as forest. The confusion occurs mainly due
to variation in planting seasons, seasonality, rainfall and lighting (angle of illumination
and terrain).
After the initial separation of what may be forest using NDFI, a set of rules is applied
to refine the classification. These rules that may have effect only on regions, years, or
specific cases, but all are considered essential to reduce classification errors. In cases
where these rules have no effect to reduce confusion it has generic values that do not
disrupt the classification of forest.
Natural Non-Forest Wetlands
Wetlands is identified based on the existence of vegetation and water. In the decision
tree, it is identified as areas with high NDFI (the same as forest) and high fraction of
SHADE (the surface of water is identified as SHADE in SMA) in areas with low slope.
Farming (biomes)
This class identify non-forest areas that still have some vegetation. It includes areas
with pasture and agriculture. This generic class will be replaced in integration with
pasture and agriculture classification.
Other non-vegetated areas
This class identify areas with no vegetation. It includes urban areas, dunes, sand, mines
or exposed soil (exposed soil prepared to agriculture was classified as Farming).
Part of this generic class will be reclassified in the integration with other themes.
Water
This class is produces by FMASK filter (ZHU; WANG; WOODCOCK, 2015; ZHU;
WOODCOCK, 2012).
It also complemented by pixels with high values of SHADE fraction in low slope.
Not observed
This class is produces by FMASK filter (ZHU; WANG; WOODCOCK, 2015; ZHU;
WOODCOCK, 2012).
It also includes areas with high SHADE fraction and high slope where the shade of the
terrain does not permit to classify the area.
In collection 2 the pixels of forest with high values of CLOUD fraction was also classified
as “Not observed”. As mosaic used in classification should have no cloud, these pixels
of forest with high “CLOUD” was considered contaminated and discarded. Classified as
“not observed” it may be replaced by the correct value in integration.
Collection 2 does not include natural formations of savanna or grassland. This may
cause some differences in the border with CERRADO, CAATINGA and PAMPA biomes.
Natural grassland appears in high elevation areas in the south region, close to PAMPA
border. Savanna appear in MG and BA close to CERRADO and CAATINGA border.
3.3.4. Decision Tree
Figure 24. Decision Tree to Atlantic Forest Biome
Annex 2: Table with the parameters for each variable.
Each node described in detail:
[1-1] CLOUD >= 30
Cloud is the fraction with a possible remain of cloud in the pixel. This parameter classify
pixel with high fraction of cloud as “Not observed”. It has little effect because FMASK
has removed most of cloud pixels but still necessary as FMASK do not remove all
clouds.
[2-1] WATER_MASK = 255
Water_mask is a band that identify pixels marked as Water by FMASK.
[3-2] SLOPE < 10
Slope band is generetad using NASA DEM. This parameter fix confusion with water in
shades caused by terrain. High slope areas identified as water by FMASK is reclassified
as “Not Observed”
[3-1] SHADE >= 92
This parameter classifies as Water areas with high shade fraction that was not identified
by FMASK.
[4-2] SLOPE < 10
This parameter fix confusion with water in shades caused by terrain. High slope areas
identified as water by high shade is reclassified as “Not Observed”
[4-1] NDFI >= 185
High NDFI is used to identify Atlantic Forest. The value is around 170 to 190 and it
identifies areas with high GV and/or SHADE and low NPV and SOIL.
[5-2] FCI >= 95
FCI is a Forest Canopy Index calculate based on the GV normalized by SHADE.
This parameter remove from the Forest class the areas with homogenous canopy cover
and reclassify it as Farming.
[6-4] SLOPE < 10
This parameter reclassifies Farming as Forest again if it is in high slope. It is used
because Forest in high slope with high illumination may be classified as Farming by
mistake.
[6-3] NDFI_AMPLITUDE >= 50
This parameter uses the annual variation of NDFI to remove Farming from Forest. The
Atlantic Forest don’t have huge variation over the year except in deciduous or semi-
deciduous areas, where this value was increased. Farming and plantation may have
higher variations and they are removed form Forest class when its identified.
To avoid any confusion with reaming cloud any pixel with NDFI igual ZERO was
removed from the mosaic. Some areas with great variation may not be identified but
it’s safer to make sure no forest with cloud may be lost.
[6-3] SHADE >= 85
The water in wetlands affects the value of shade fraction and increases the value of
NDFI including then in Forest by mistake. This parameter remove wetlands from Forest.
[8-10] SLOPE < 10
This parameter reclassifies the wetland as forest if it’s in high slope. The shade that was
identified is based on terrain and not from the water of wetlands.
[8-9] EVI2 < 115
EVI2 is a reflectance index calculated using Bnir (near infra-red) and Rred LandSat
bands:
This parameter utilizes EVI2 to remove farming that was classified as Forest by
confusion. It usually occurs in areas with shades caused by terrain.
[9-17] CLOUD >= 5
The fraction cloud is used to avoid pixels contaminated with cloud to be classified as
Forest. Most of pixels should have cloud fraction very close to ZERO as they were
filtered by FMASK. When these contaminated pixels are classified as Forest they are
reclassified as “Not Observed”.
[10-33] NPVSOIL < 8
This parameter segregate Dense Forest from Open Forest. The fractions of SOIL and
NPV are bigger in Open Forest.
[5-1] NDFI >= 65
This parameter segregate areas with any GV or shade from non-vegetated areas (soil,
urban areas, sand, etc.)
[6-1] NDFI_AMPLITUDE >= 50
This parameter includes as agriculture areas with soil exposed or prepared for planting
at the time of the image but which had vegetation (high NDFI) during the year. Instead
of classifying the current coverage (soil exposed) the use was classified (agriculture).
[7-1] SHADE >= 85
This parameter with the slope in sequence, removes from the forest class the areas with
shade from solar illumination resulted from terrain (slopes without vegetation and
without lighting)
[8-2] SLOPE < 10
This parameter classifies the areas with high slope and high shade as “Not Observed”.
3.3.4. Temporal Filter
SINGH, 1989 indicated that there are two basic approaches for change detection; (1)
comparative analysis of independently produced classifications for different dates and
(2) simultaneous analysis of multitemporal data. MapBiomas uses the first approach
and apply a Temporal Filter to maintain consistence between each year.
Temporal Filter may analyses the classification of 1 year before and 1 year after (kernel
3) to change the class of current year if necessary. It may also analyze 2 years before
and 2 years after (kernel 5) or, in special cases like first year (2000 in collection 2),
analyze only 2 years after (2001 and 2002) or like the last year (2016 in collection 2),
analyze only 2 years before (2014 and 2016).
Analyzing other years helps to correct invalid transitions caused by misclassification. A
pixel could never be agriculture in one year then forest in next and agriculture again in
the following year.
The algorithm is applied in the first year and then use the corrected data as reference
to all sequential years.
Figure 25. Temporal rule explanation
In the collection 2, each bioma was able to produce a set of rules for temporal filter as
far as those rules respect the following guidelines: (i) ….(ii) ….(iii)….
There are a set of rules to correct impossible transition applied to collection 2. In the
table below, the code for each class are:
3 = Dense Forest
4 = Open Forest
11 = Natural Non-Forest Wetlands
21 = Farming
25 = Non-Vegetated Area
26 = Water
27 = Not observed
Table 4. General Rules: In case of “Not observed” repeat the last valid class:
Rule Type Kernel 1 year Before
Current Year
1 year After Result
Comment
R01 RG 3 3 27 4 3 Keep last class in not observed
R02 RG 3 3 27 21 3 Keep last class in not observed
R03 RG 3 3 27 25 3 Keep last class in not observed
R04 RG 3 3 27 26 3 Keep last class in not observed
R05 RG 3 3 27 11 3 Keep last class in not observed
R06 RG 3 3 27 27 3 Keep last class in not observed
R07 RG 3 4 27 3 4 Keep last class in not observed
R08 RG 3 4 27 21 4 Keep last class in not observed
R09 RG 3 4 27 25 4 Keep last class in not observed
R10 RG 3 4 27 26 4 Keep last class in not observed
R11 RG 3 4 27 11 4 Keep last class in not observed
R12 RG 3 4 27 27 4 Keep last class in not observed
R13 RG 3 21 27 3 21 Keep last class in not observed
R14 RG 3 21 27 4 21 Keep last class in not observed
R15 RG 3 21 27 11 21 Keep last class in not observed
R16 RG 3 21 27 26 21 Keep last class in not observed
R17 RG 3 25 27 3 25 Keep last class in not observed
R18 RG 3 25 27 4 25 Keep last class in not observed
R19 RG 3 25 27 11 25 Keep last class in not observed
R20 RG 3 25 27 26 25 Keep last class in not observed
R21 RG 3 26 27 3 26 Keep last class in not observed
R22 RG 3 26 27 21 26 Keep last class in not observed
R23 RG 3 26 27 25 26 Keep last class in not observed
R24 RG 3 26 27 4 26 Keep last class in not observed
R25 RG 3 26 27 11 26 Keep last class in not observed
R26 RG 3 26 27 27 26 Keep last class in not observed
R27 RG 3 11 27 3 11 Keep last class in not observed
R28 RG 3 11 27 21 11 Keep last class in not observed
R29 RG 3 11 27 25 11 Keep last class in not observed
R30 RG 3 11 27 4 11 Keep last class in not observed
R31 RG 3 11 27 26 11 Keep last class in not observed
R32 RG 3 11 27 27 11 Keep last class in not observed
R80 RG 3 21 27 27 21 Keep last class in not observed
R81 RG 3 25 27 27 25 Keep last class in not observed
Table 5. General Rules: Invalid transitions
Rule Type Kernel 1 year Before
Current Year
1 year After Result
Comment
R33 RG 3 3 21 3 3 1 dif. value between 2 equals
R34 RG 3 3 25 3 3 1 dif. value between 2 equals
R35 RG 3 3 27 3 3 1 dif. value between 2 equals
R36 RG 3 3 26 3 3 1 dif. value between 2 equals
R37 RG 3 3 11 3 3 1 dif. value between 2 equals
R38 RG 3 3 4 3 3 1 dif. value between 2 equals
R39 RG 3 4 27 4 4 1 dif. value between 2 equals
R40 RG 3 4 21 4 4 1 dif. value between 2 equals
R41 RG 3 4 25 4 4 1 dif. value between 2 equals
R42 RG 3 4 3 4 4 1 dif. value between 2 equals
R43 RG 3 4 11 4 4 1 dif. value between 2 equals
R44 RG 3 4 26 4 4 1 dif. value between 2 equals
R45 RG 3 21 3 21 21 1 dif. value between 2 equals
R46 RG 3 21 4 21 21 1 dif. value between 2 equals
R47 RG 3 21 25 21 21 1 dif. value between 2 equals
R48 RG 3 21 27 21 21 1 dif. value between 2 equals
R49 RG 3 21 11 21 21 1 dif. value between 2 equals
R50 RG 3 21 3 25 21 1 dif. value between 2 equals
R51 RG 3 21 4 25 21 1 dif. value between 2 equals
R52 RG 3 21 27 25 21 1 dif. value between 2 equals
R53 RG 3 21 11 25 21 1 dif. value between 2 equals
R54 RG 3 21 26 21 21 1 dif. value between 2 equals
R55 RG 3 21 26 25 21 1 dif. value between 2 equals
R56 RG 3 25 3 25 21 1 dif. value between 2 equals
R57 RG 3 25 4 25 21 1 dif. value between 2 equals
R58 RG 3 25 21 25 21 1 dif. value between 2 equals
R59 RG 3 25 27 25 25 1 dif. value between 2 equals
R60 RG 3 25 11 25 25 1 dif. value between 2 equals
R61 RG 3 25 3 21 21 1 dif. value between 2 equals
R62 RG 3 25 4 21 21 1 dif. value between 2 equals
R63 RG 3 25 27 21 21 1 dif. value between 2 equals
R64 RG 3 25 11 21 21 1 dif. value between 2 equals
R65 RG 3 25 26 25 25 1 dif. value between 2 equals
R66 RG 3 25 26 21 21 1 dif. value between 2 equals
R67 RG 3 26 21 26 26 1 dif. value between 2 equals
R68 RG 3 26 25 26 26 1 dif. value between 2 equals
R69 RG 3 26 27 26 26 1 dif. value between 2 equals
R70 RG 3 26 3 26 26 1 dif. value between 2 equals
R71 RG 3 26 11 26 26 1 dif. value between 2 equals
R72 RG 3 26 4 26 26 1 dif. value between 2 equals
Rule Type Kernel 1 year Before
Current Year
1 year After Result
Comment
R73 RG 3 11 21 11 11 1 dif. value between 2 equals
R74 RG 3 11 25 11 11 1 dif. value between 2 equals
R75 RG 3 11 27 11 11 1 dif. value between 2 equals
R76 RG 3 11 26 11 11 1 dif. value between 2 equals
R77 RG 3 11 3 11 11 1 dif. value between 2 equals
R78 RG 3 11 4 11 11 1 dif. value between 2 equals
Table 6. General Rule: Invalid regeneration with kernel 5 years
Rule Type Kernel 2 years Before
1 year Before
Current Year
1 year After
2 year After Result
R79 RG 5 21 21 3 3 21 21
Comment: After 2 years of farming it’s impossible to regenerate directly to Dense
Forest for 2 years and became farming again in the next year.
Table 7. Rules to First year
Rule Type Kernel 2000 2001 2002 Result 2000
Comment
RP01 RP 3 21 3 3 3 Invalid regeneration
RP02 RP 3 25 3 3 3 Invalid regeneration
RP03 RP 3 25 21 21 21 Invalid Transition
RP04 RP 3 25 21 25 21 Invalid Transition
RP05 RP 3 25 25 21 21 Invalid Transition
RP06 RP 3 27 21 21 21 Replaced non-observed by
repeated value
RP07 RP 3 27 25 25 25 Replaced non-observed by
repeated value
RP08 RP 3 27 26 26 26 Replaced non-observed by
repeated value
RP09 RP 3 27 11 11 11 Replaced non-observed by
repeated value
RP10 RP 3 27 3 3 3 Replaced non-observed by
repeated value
RP11 RP 3 27 4 4 4 Replaced non-observed by
repeated value
RP12 RP 3 27 3 4 3 Replaced non-observed by
repeated value
RP13 RP 3 27 21 25 21 Replaced non-observed by
repeated value
RP14 RP 3 27 25 21 21 Replaced non-observed by
repeated value
Table 8. Rules to Last year
Rule Type Kernel 2014 2015 2016 Result 2016
Comment
RU01 RU 3 21 21 3 21 Invalid regeneration
RU02 RU 3 21 21 4 21 Invalid regeneration
RU03 RU 3 25 25 3 25 Invalid regeneration
RU04 RU 3 25 25 4 25 Invalid regeneration
RU05 RU 3 21 25 3 21 Invalid regeneration
RU06 RU 3 21 25 4 21 Invalid regeneration
RU07 RU 3 25 21 3 21 Invalid regeneration
RU08 RU 3 25 21 4 21 Invalid regeneration
RU09 RU 3 3 3 27 3 Repeated last valid class
RU10 RU 3 4 4 27 4 Repeated last valid class
RU11 RU 3 21 21 27 21 Repeated last valid class
RU12 RU 3 25 25 27 25 Repeated last valid class
RU13 RU 3 26 26 27 26 Repeated last valid class
RU14 RU 3 11 11 27 11 Repeated last valid class
3.3.4. Data volumes and processing issues
The collection 2 mapped 17 years (2000 to 2016) in the 122 charts. That’s 2.074 charts
to parametrize and process.
The use of GEE assets has increased the process performance. Once the parameters of
mosaic are defined the result is stored as asset with all fractions and index (24 bands
in total). The classification process may be done several times to adjust the correct
parameters and its much faster processing the mosaic asset for each grid.
3.3.4. Collection 2.3
The collection 2 was launched in march 2017. The forest class has accuracy higher then
90% but we identify that it has some seasonal variation over the years. The dry years
tend to have less forest and rainy years tend to have more forest. The parametrization
process of the empirical tree for each grid and each year was able to reduce this effect
but could not remove its affects.
In order to produce a classification that could be compered over the years we used
Random Forest algorithm to reclassify the annual forest map based in samples
distributed in the areas that were “stable” in the collection 2 classification. The
proposed methodology would be able to produce maps with less noises and errors
caused by seasonality and differences in Landsat sensors as each year will be classified
with the same samples, trained with the image of each year.
The annual map from in each chart produced by MapBiomas project in the period 2000
to 2016 was combined to produce a map with 4 classes:
• Stable Forest – pixels classified as forest 15 or more times in 17 years
• Stable Non-Forest – pixels classified as forest 5 times or less in 17 years grouping
pasture, agriculture, non-vegetated areas and urban.
• Undetermined – pixels classified as forest from 6 to 14 times in 17 years
• Water - pixels classified as water 12 or more times in 17 years
• Grassland – we added the class of high altitude natural fields in RS, SC and PR
from Atlas dos Remanescentes da Mata Atlântica (SOS Mata Atlântica/INPE)
• Savannas – we added savanna from Cerrado and Caatinga biome in the border
grids
These classes were used to generate the random samples used in training and
validation. The class “Undetermined” was ignored as input.
Based on the map of stables classes we generated 20.000 random sample points for
each chart. Using the whole chart to generate the random sample points instead of a
fixed number of points to each class is a way to balance the samples as the occurrence
of the class in the chart.
We used Random Forest with 100 interactions to make a new classification for each
grid. The processes of spatial and temporal filter and integration was applied using the
same rules from collection 2.
After the integration we build a new asset with the transitions comparing maps from 2
different years. A spatial filter were applied to the transitions to remove border errors.
4. Validation Strategies
Validation used two basic approaches: (i) comparison with other land use maps were
available; (ii) collection of sampling points for accuracy analyses.
The comparison was done against Atlas dos Remanescentes da Mata Atlântica and
FBDS maps from some states
Espírito Santo
Rio de Janeiro
Santa Catarina
Figure 266. Confusion matrix from MapBiomas col 2.3 and FBDS states
As for the accuracy analyze, the validation is being done based in 667 random points
selected overt the grid of Brazilian forest inventory performed by SFB19-MMA20.
Webcollect is a tool implemented to evaluate each point based on visual interpretation
of the same Landsat mosaic used in the classification. Each point is evaluated by 3
different interpreters with long experience in Landsat image interpretation and Atlantic
forest mapping. The evaluation considers the exact pixel that is viewed in the image
for each year.
The interpreter is instructed to consider the rules of temporal filter applied in the
classification. If the pixel is not available in one specific year, the interpreter should
repeat the last visible class until a new image is available.
Figure 277. Distribution of 667 validation points
19 SFB - Serviço Florestal Brasileiro - Brazilian Forest Service 20 MMA - Ministério do Meio Ambiente - Ministry of the Environment
Figure 288. Images of the same pixel from 2000 to 2016
The final class of each point is the class equally classified by at least 2 interpreters.
This reference class of each year is compared with result map from temporal filter to
build the confusion matrix and evaluate omission and commission errors for each
year.
Figure 299. Example of confusion matrix and omission, commission and total accuracy
Figure 30. Accuracy for collection 2.3 in level 3 legend.
5. Concluding Remarks and Perspectives
Collection 2.3 is a great improve from collection 2 data. Collection 3 will produce maps
from 1985 to 2017 using Landsat images and more detailed legend.
Collection 2.3 has included some of high-altitude savanna, specially in the border of
Santa Catarina and Rio Grande do Sul states. The other areas will be included in
Collection 3:
Figure 30. Location of savanna in Atlantic Forest Biome
It’s important to start some tests with Sentinel images with 10m spatial resolution on
a perspective to improve new maps produced after Collection 3.
6. References
SINGH, A. Review Article Digital change detection techniques using remotely-sensed
data. International Journal of Remote Sensing, v. 10, n. 6, p. 989–1003, 1989.
SOUZA, C. M.; ROBERTS, D. A.; COCHRANE, M. A. Combining spectral and spatial
information to map canopy damage from selective logging and forest fires. Remote
Sensing of Environment, v. 98, n. 2–3, p. 329–343, 2005.
ZHU, Z.; WANG, S.; WOODCOCK, C. E. Improvement and expansion of the Fmask
algorithm: cloud, cloud shadow, and snow detection for Landsats 4–7, 8, and Sentinel
2 images. Remote Sensing of Environment, v. 159, p. 269–277, mar. 2015.
ZHU, Z.; WOODCOCK, C. E. Object-based cloud and cloud shadow detection in
Landsat imagery. Remote Sensing of Environment, v. 118, p. 83–94, mar. 2012.
7. Appendices
9.1. Algorithm Code
var anos = ['2015','2016'];
// Tabela com Parâmetros
var paramsFusionTable = "ft:1XbDRVJ0FUX8Bl6ghFPWo25DggtriIETxRfjI7Dri";
var paramsFeatureColection = ee.FeatureCollection(paramsFusionTable);
var cartaslist = ['SF-22-Z-C'//,'SG-22-V-B','SG-22-X-A',
//'SG-22-V-C','SG-22-V-D','SG-22-X-C'
];
// Grid com cartas 1:250.000
var gridFusionTable = 'ft:1wCmguQD-xQs2gMH3B-hdOdrwy_hZAq4XFw1rU8PN';
var gridFeatureCollection = ee.FeatureCollection(gridFusionTable);
// Fusion Table com o limite do BIOMA
// Fonte: IBGE. 5.000.000, 2007
var biomaFusionTable = "ft:1H32agP9xr-BIDKl4irmhFCLxI5_TOs9nvbEz-C6u";
var biomaFeatureCollection = ee.FeatureCollection(biomaFusionTable);
// Fusion Table com o limite dos Estados Brasileiros
// Fonte: IBGE 500.000, 2010
var ufFusionTable = "ft:1n-9np_o8hbDaCuYFwhkgEulN8770mW0n302YyHGo";
var ufFeatureCollection = ee.FeatureCollection(ufFusionTable);
/*
=========================================================================================
FUNCTION NAME:
decisionTree Ombrofila
PURPOUSE:
ARGUMENTS:
[arg1] imagem sma
[arg2] imagem ndfi
=========================================================================================
*/
var decisionTree_Ombrofila = function(info, imagem){
var ano = info.carta1.year
// Rename fraction bands
var gv = imagem.select('gv');
var fci = imagem.select('fci');
var npv = imagem.select('npv');
var soil = imagem.select('soil');
var cloud = imagem.select('cloud');
var gvs = imagem.select('gvs');
var water_mask = imagem.select('water_mask');
var ndfi = imagem.select('ndfi');
var ndvi = imagem.select('ndvi');
var evi2 = imagem.select('evi2');
var wvi = imagem.select('wvi');
var mosaico_ano_dif = imagem.select('ndfi_amplitude');
var slope = imagem.select('slope');
var gvnpvs = imagem.select('gvnpvs');
var shade = imagem.select('shade');
var ndwi = imagem.select('ndwi');
var npvsoil = imagem.select('npvsoil');
// Variables
var v1 = info.carta1.dtv.v1;
var v2 = info.carta1.dtv.v2;
var v3 = info.carta1.dtv.v3;
var v4 = info.carta1.dtv.v4;
var v5 = info.carta1.dtv.v5;
var v6 = info.carta1.dtv.v6;
var v7 = info.carta1.dtv.v7;
var v8 = info.carta1.dtv.v8;
var v9 = info.carta1.dtv.v9;
var v10 = info.carta1.dtv.v10;
// Define classification image
var dataClass = ee.Image(0).toByte();
//Muito Alto NDFI
//var floresta_densa1 = (ndfi.gt(300));
var floresta_densa2 = (ndfi.gte(v1)).and(fci.gte(v2)).and(slope.gte(v7));
dataClass = dataClass.where(floresta_densa2.eq(1), 3); // floresta_densa2
var floresta_densa1 =
(ndfi.gte(v1)).and(fci.lt(v2)).and(shade.lt(v9)).and(npvsoil.lt(v4)).and(evi2.gte(v3)).and(cloud.lt(v10));
dataClass = dataClass.where(floresta_densa1.eq(1), 3); // Forest densa
var nao_flo_evi2 =
(ndfi.gte(v1)).and(fci.lt(v2)).and(shade.lt(v9)).and(npvsoil.lt(v4)).and(evi2.lt(v3)).and(cloud.lt(v10));
dataClass = dataClass.where(nao_flo_evi2.eq(1), 14); // nao_flo_evi2
var nao_obs1 = (ndfi.gte(v1)).and(fci.lt(v2)).and(shade.lt(v9)).and(npvsoil.lt(v4)).and(cloud.gte(v10));
dataClass = dataClass.where(nao_obs1.eq(1), 32); // não obser
var floresta_aberta1 = (ndfi.gte(v1)).and(fci.lt(v2)).and(shade.lt(v9)).and(npvsoil.gte(v4)).and(cloud.lt(v10));
dataClass = dataClass.where(floresta_aberta1.eq(1), 4); // floresta_aberta1
var nao_obs2 = (ndfi.gte(v1)).and(fci.lt(v2)).and(shade.lt(v9)).and(npvsoil.gte(v4)).and(cloud.gte(v10));
dataClass = dataClass.where(nao_obs2.eq(1), 32); // não obser
var floresta_densa3 = (ndfi.gte(v1)).and(fci.lt(v2)).and(shade.gte(v9)).and(slope.gte(v7));//.and(gv.lte(v2));
dataClass = dataClass.where(floresta_densa3.eq(1), 3); // floresta_densa3
var area_umida = (ndfi.gte(v1)).and(fci.lt(v2)).and(shade.gte(v9)).and(slope.lt(v7));//.and(gv.lte(v2));
dataClass = dataClass.where(area_umida.eq(1), 11); // area_umida
var agricultura_amplitude = (ndfi.gte(v1)).and(fci.lt(v2)).and(mosaico_ano_dif.gte(v8));//.and(gv.lte(v2));
dataClass = dataClass.where(agricultura_amplitude.eq(1), 14); // Forest densa
var agricultura_alta = (ndfi.gte(v1)).and(fci.gte(v2)).and(slope.lt(v7));
dataClass = dataClass.where(agricultura_alta.eq(1), 14); // agricultura
//Médio NDFI
var agr_pasto1 = ndfi.lt(v1).and(ndfi.gte(v5))//.and(mosaico_ano_dif.gte(v8));
dataClass = dataClass.where(agr_pasto1.eq(1), 14); // nat_nao_flo
//Baixo NDFI
var agricultura3 = ndfi.lt(v5).and(mosaico_ano_dif.gte(v8));
dataClass = dataClass.where(agricultura3.eq(1), 14); // agricultura3
var nao_veg = ndfi.lt(v5).and(mosaico_ano_dif.lt(v8)).and(shade.gte(v9)).and(slope.lt(v7));
dataClass = dataClass.where(nao_veg.eq(1), 22); // nao_veg
var nao_obs = ndfi.lt(v5).and(mosaico_ano_dif.lt(v8)).and(shade.gte(v9)).and(slope.gte(v7));
dataClass = dataClass.where(nao_obs.eq(1), 32); // nao_obs
var Outros = ndfi.lt(v5).and(mosaico_ano_dif.lt(v8)).and(shade.lt(v9));
dataClass = dataClass.where(Outros.eq(1), 22); // Outros
var Agua = water_mask.eq(255).and(slope.lt(v7));
dataClass = dataClass.where(Agua.eq(1), 31); // Agua
var Agua2 = shade.gte(91).and(slope.lt(v7));
dataClass = dataClass.where(Agua2.eq(1), 31); // Outros
var sombra2 = shade.gte(91).and(slope.gte(v7));
dataClass = dataClass.where(sombra2.eq(1), 32); // Outros
var sombra = water_mask.eq(255).and(slope.gte(v7));
dataClass = dataClass.where(sombra.eq(1), 32); // sombra
return dataClass.mask(dataClass.neq(0));
};
/*
=========================================================================================
FUNCTION NAME:
mapAddLayers
PURPOUSE:
Adiciona as camadas ao mapa
ARGUMENTS:
[arg1]
[arg2]
=========================================================================================
*/
var mapAddLayers = function(imagem, imagemclass, dTree, carta, year, gridName, sensor){
var ndfi_color =
'FFFFFF,FFFCFF,FFF9FF,FFF7FF,FFF4FF,FFF2FF,FFEFFF,FFECFF,FFEAFF,FFE7FF,'+
'FFE5FF,FFE2FF,FFE0FF,FFDDFF,FFDAFF,FFD8FF,FFD5FF,FFD3FF,FFD0FF,FFCEFF,'+
'FFCBFF,FFC8FF,FFC6FF,FFC3FF,FFC1FF,FFBEFF,FFBCFF,FFB9FF,FFB6FF,FFB4FF,'+
'FFB1FF,FFAFFF,FFACFF,FFAAFF,FFA7FF,FFA4FF,FFA2FF,FF9FFF,FF9DFF,FF9AFF,'+
'FF97FF,FF95FF,FF92FF,FF90FF,FF8DFF,FF8BFF,FF88FF,FF85FF,FF83FF,FF80FF,'+
'FF7EFF,FF7BFF,FF79FF,FF76FF,FF73FF,FF71FF,FF6EFF,FF6CFF,FF69FF,FF67FF,'+
'FF64FF,FF61FF,FF5FFF,FF5CFF,FF5AFF,FF57FF,FF55FF,FF52FF,FF4FFF,FF4DFF,'+
'FF4AFF,FF48FF,FF45FF,FF42FF,FF40FF,FF3DFF,FF3BFF,FF38FF,FF36FF,FF33FF,'+
'FF30FF,FF2EFF,FF2BFF,FF29FF,FF26FF,FF24FF,FF21FF,FF1EFF,FF1CFF,FF19FF,'+
'FF17FF,FF14FF,FF12FF,FF0FFF,FF0CFF,FF0AFF,FF07FF,FF05FF,FF02FF,FF00FF,'+
'FF00FF,FF0AF4,FF15E9,FF1FDF,FF2AD4,FF35C9,FF3FBF,FF4AB4,FF55AA,FF5F9F,'+
'FF6A94,FF748A,FF7F7F,FF8A74,FF946A,FF9F5F,FFAA55,FFB44A,FFBF3F,FFC935,'+
'FFD42A,FFDF1F,FFE915,FFF40A,FFFF00,FFFF00,FFFB00,FFF700,FFF300,FFF000,'+
'FFEC00,FFE800,FFE400,FFE100,FFDD00,FFD900,FFD500,FFD200,FFCE00,FFCA00,'+
'FFC600,FFC300,FFBF00,FFBB00,FFB700,FFB400,FFB000,FFAC00,FFA800,FFA500,'+
'FFA500,F7A400,F0A300,E8A200,E1A200,D9A100,D2A000,CA9F00,C39F00,BB9E00,'+
'B49D00,AC9C00,A59C00,9D9B00,969A00,8E9900,879900,7F9800,789700,709700,'+
'699600,619500,5A9400,529400,4B9300,439200,349100,2D9000,258F00,1E8E00,'+
'168E00,0F8D00,078C00,008C00,008C00,008700,008300,007F00,007A00,007600,'+
'007200,006E00,006900,006500,006100,005C00,005800,005400,005000,004C00';
//define os parâmetros de visualização das imagens Landsat 8
var visNDFI = {'min':0, 'max':200, 'palette':ndfi_color};
var visDT =
{'min':1,'max':12,'palette':'#006400,#00FF00,#0000FF,#C2DB6E,#45C2A5,#65C24B,#FFFF8F,#FF0000,#000000,#
10290F,#FFAD2A,#FFD882','format':'png'};
var visSMA = {'bands':['soil'+ano, 'gv'+ano, 'npv'+ano], 'gain': [6.0,4.0,6.0]};
Map.addLayer(imagem, {'bands': ['swir1', 'nir', 'red'],'gain' : [0.08, 0.06, 0.2],'gamma': 0.5}, ano + "Reflect "+
gridName, false);
Map.addLayer(dTree, {
"min": 0,
"max": 33,
"palette": "ffffff,129912,1f4423,006400,00ff00,65c24b," +
"687537,29eee4,77a605,935132,ffe599,45c2a5," +
"f1c232,b8af4f,ffffb2,ffd966,ffe599,f6b26b," +
"e974ed,d5a6bd,c27ba0,a64d79,ea9999,cc4125," +
"dd7e6b,e6b8af,980000,999999,b7b7b7,434343," +
"d9d9d9,0000ff,d5d5e5,FF0000",
"format": "png"
},year + "DTree "+ gridName, false);
};
/*
=========================================================================================
FUNCTION NAME:
getGridNameInfo
PURPOUSE:
Lê informações de cada carta
ARGUMENTS:
[arg1]
[arg2]
=========================================================================================
*/
var getGridNameInfo = function(features, gridname){
var prop = -1;
for (var i=0;i<features.length; i++){
var feature = features[i];
if (feature.properties.GRID_NAME == gridname){
prop = {
year: feature.properties.YEAR,
t0: feature.properties.T0,
t1: feature.properties.T1,
cc: feature.properties.CLOUD_COVER,
gridname: feature.properties.GRID_NAME,
dtv:{
v1: feature.properties.DTV1,
v2: feature.properties.DTV2,
v3: feature.properties.DTV3,
v4: feature.properties.DTV4,
v5: feature.properties.DTV5,
v6: feature.properties.DTV6,
v7: feature.properties.DTV7,
v8: feature.properties.DTV8,
v9: feature.properties.DTV9,
v10: feature.properties.DTV10
},
chave: feature.properties.CHAVE,
sensor: feature.properties.SENSOR,
tag:{
on: feature.properties.TAG_ON,
ndfi: feature.properties.NDFI,
sma: feature.properties.SMA,
ref: feature.properties.REF,
dt: feature.properties.DT
},
save: feature.properties.SAVE,
bioma: feature.properties.BIOMA,
region: feature.properties.REGION,
};
}
}
return prop;
};
/*
=========================================================================================
FUNCTION NAME:
mapBiomasDoIt
PURPOUSE:
Executa as funções da metodologia para um determinado ano
ARGUMENTS:
[arg1] info.yYYYY (YYYY = ano)
[arg2] data
=========================================================================================
*/
var mapBiomasDoIt = function(info, carta_atual,imagem){
//cria a coleção de imagens e aplica o filtro por período
if (info.carta1.tag.on) {
//gera classificacao
switch (info.carta1.chave){
case 1:
var dTree = decisionTree_Ombrofila(info, imagem);
break;
}
var result = dTree;
} else {
var result = -1;
}
return result;
};
//*********************************************************************
// Início da Rotina
//*********************************************************************
// console.log('------------------ Statistics------------------');
var featuresTable = [];
var featureCol = null;
for (var i_ano=0;i_ano<anos.length; i_ano++){
var ano = anos[i_ano];
var dir = 'projects/mapbiomas-workspace/MOSAICOS/workspace/MATAATLANTICA_'
var dirclass = 'projects/mapbiomas-workspace/COLECAO2_1/classificacao/MATAATLANTICA_'
var fcSelected = paramsFeatureColection.filterMetadata('YEAR','equals',ano);
var features = fcSelected.getInfo().features;
for (var i=0;i<cartaslist.length; i++){
var carta = cartaslist[i];
var info = {carta1:getGridNameInfo(features,carta)};
var carta_atual = gridFeatureCollection.filterMetadata('name', "equals", carta)
var imagem = ee.Image(dir+carta+'_'+ano+'_0');
var imagemclass = ee.Image(dirclass+carta+'_'+ano+'_0');
var dTree = mapBiomasDoIt(info,carta_atual,imagem);
var mapcarta1 = mapAddLayers(imagem, imagemclass, dTree, carta_atual, ano, carta,info.carta1.sensor);
}
}
//--------------------------------------------------------------------------------------------
// Adicona o Grid
//--------------------------------------------------------------------------------------------
var blank = ee.Image(0).mask(0);
var outline = blank.paint(gridFeatureCollection, 'AA0000', 1);
var visPar = {'palette':'AA0000','opacity': 0.6};
Map.addLayer(outline, visPar, 'GRID 250mil', false);
//--------------------------------------------------------------------------------------------
// Add Bioma
//--------------------------------------------------------------------------------------------
var blank = ee.Image(0).mask(0);
var outline = blank.paint(biomaFeatureCollection, '000000', 2);
var visPar = {'palette':'000000','opacity': 0.7};
Map.addLayer(outline, visPar, 'Region', false);
9.2. Supplemental Material
Annex 1: Table with the parameters of each grid 1: 250.000 for each year.
Annex 2: Table with the parameters for each variable.