Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
lesson_9 [2019/09/22 19:58]
britaldo
lesson_9 [2020/02/10 21:52]
argemiro
Line 6: Line 6:
 The aim of this lesson is introducing the calculation of area of each source feature on Dinamica EGO to the user. For this, we will calculate the area of each category of Legal Amazon Protected Areas map in the year 2000 and calculate biomass and Carbon Dioxide content in Biomass within high priority conservation areas. The aim of this lesson is introducing the calculation of area of each source feature on Dinamica EGO to the user. For this, we will calculate the area of each category of Legal Amazon Protected Areas map in the year 2000 and calculate biomass and Carbon Dioxide content in Biomass within high priority conservation areas.
 \\ \\
-In this lesson we will use the functors **Calc Areas** and **Calculate Map** and the following files:+In this lesson we will use the following files:
 \\ \\
 \\ \\
-  * The protected areas map in the year 2000 (''​Guidebook Dinamica_4/​Database/​Protected_areas/​protected_areas_2000.tif''​)+  * The protected areas map in the year 2000 (''​Guidebook_Dinamica_5/​Database/​Protected_areas/​protected_areas_2000.tif''​)
 \\ \\
-  * The Legal Amazon conservation priority map (''​Guidebook Dinamica_4/​Database/​Priority_areas/​priority_areas.tif''​) ​+  * The Legal Amazon conservation priority map (''​Guidebook_Dinamica_5/​Database/​Priority_areas/​priority_areas.tif''​) ​
 \\ \\
-  * The Legal Amazon biomass map (''​Guidebook Dinamica_4/​Database/​biomass/​biomass.tif''​)+  * The Legal Amazon biomass map (''​Guidebook_Dinamica_5/​Database/​biomass/​biomass.tif''​)
 \\ \\
 \\ \\
Line 50: Line 50:
 \\ \\
 \\ \\
-  * Initially, we must open all the files that will be used. On the Input/​Output tab from the library window, grab two **Load Categorical Map** and place them on the sketch. Double click each **Load Categorical Map** and load the Legal Amazon Conservation Priority (''​Guidebook Dinamica_4/​Database/​Priority_areas/​priority_areas.tif''​) and Protected Areas maps (''​Guidebook Dinamica_4/​Database/​Protected_areas/​protected_areas_2000.tif''​). Place a **Load Map** and open the Legal Amazon Biomass map (''​Guidebook Dinamica_4/​Database/​biomass/​biomass.tif''​).+  * Initially, we must open all the files that will be used. On the Input/​Output tab from the library window, grab two **Load Categorical Map** and place them on the sketch. Double click each **Load Categorical Map** and load the Legal Amazon Conservation Priority (''​Guidebook_Dinamica_5/​Database/​Priority_areas/​priority_areas.tif''​) and Protected Areas maps (''​Guidebook_Dinamica_5/​Database/​Protected_areas/​protected_areas_2000.tif''​). Place a **Load Map** and open the Legal Amazon Biomass map (''​Guidebook_Dinamica_5/​Database/​biomass/​biomass.tif''​).
 \\ \\
 \\ \\
Line 68: Line 68:
 \\ \\
 \\ \\
-  * Now, you need save the result of biomass to a file. Place a **Save Map** on the sketch and connect **Calculate Map** to it. Open **Save Map**, browse to a suitable folder and write the file name (e.g. biomass_high priority conservation_protected areas_map.tif).+  * Now, you need save the result of biomass to a file. Place a **Save Map** on the sketch and connect **Calculate Map** to it. Open **Save Map**, browse to a suitable folder and write the file name (e.g. biomass_high_priority_conservation_protected_areas_map.tif).
 \\ \\
 \\ \\
Line 77: Line 77:
 \\ \\
 \\ \\
-  * Grab and place on the sketch a **Calculate Value**. Click in the hook tool to create three hook functors inside ​the Calculate Value: one Number ​table and two Number ​value functors. Assign a number to each Number Value and Number Table. ​+  * Grab and place on the sketch a **Calculate Value**. Click in the hook tool to create three hook functors inside ​**Calculate Value**: one **Number ​Table** ​and two **Number ​Value**. Assign a number to each **Number Value** and **Number Table**
 \\ \\
 \\ \\
-In some cases, is very useful to add a constant value to the operations in Dinamica. In this step, we will demonstrate how to do this. For this, grab and place on the sketch two Real value functors located on the Map Algebra suppl. tab to insert two double precision real constants: One is a CO2 conversion factor (3.666) and other a Carbon Content in Biomass (0.47). Connect the Extract map attributes Map to Number Table and the two Real Value functors to Number Value Functors inside the Calculate Value. At this step you should have something like this:+<note important>​ 
 +In some cases, is very useful to add a constant value to the operations in Dinamica. In the next step, we will demonstrate how to do this.  
 +</​note>​
 \\ \\
 +  * Grab and place on the sketch two **Real Value** located on the ''​Map Algebra (Suppl.)''​ tab to insert two double precision real constants:
 \\ \\
-{{ :imagem74.png?800 |}}+     - A CO2 conversion factor (3.666)  
 +     - Carbon Content in Biomass (0.47)
 \\ \\
 +  * Connect **Extract Map Attributes** to **Number Table** and the two **Real Value** functors to the **Number Value** functors inside the **Calculate Value**. At this step you should have something like this:
 \\ \\
-Now, write the following equation inside to Calculate Value to estimate CO2 content of high priority conservation areas within protected areas using the Map statistics calculate by Extract Map attributes functor ("​cellSum"​ and "​cellArea"​) and the two constant values added (v1 and v2): 
 \\ \\
 +{{ :​imagem74.png?​800 |}}
 \\ \\
-//​t1["​cellSum"​] * t1["​cellArea"​] * v1 * v2// 
 \\ \\
-\\ +  * Write the following equation in **Calculate Value** to estimate CO2 content of high priority conservation areas using the map statistics calculated by **Extract Map Attributes** ("​cellSum"​ and "​cellArea"​) and the two constant values added (v1 and v2)''​t1["​cellSum"​] * t1["​cellArea"​] * v1 * v2''​
-On Dinamica EGO interface you should have something like this:+
 \\ \\
 \\ \\
Line 98: Line 101:
 \\ \\
 \\ \\
-Now, grab a Set Lookup Table Value Functor ​and place on the sketch to insert the calculate ​values into a lookup table. It is important to pay attention to add correctly ​the key to the line where the value will be inserted:+    * Grab **Set Lookup Table Value** functor ​and place it on the sketch to insert the calculated ​values into a lookup table. It is important to pay attention to add the correct ​key to the line where the value will be inserted:
 \\ \\
 \\ \\
Line 104: Line 107:
 \\ \\
 \\ \\
-<note important>​**IMPORTANT:​** ​If the table is already filled in, it replaces the old values with new values.</​note>​ +<note important>​ 
-Now you need to save the result to a file. For this, Grab and place on the sketch ​the Save Lookup Table functor ​and connect ​the functor ​Set Lookup Table to them. Open Save Lookup Table, select a folder and write a name file to save (We Suggest: ​high priority cons_prot areas_CO2.csv).+If the table is already filled in, it replaces the old values with new values. 
 +</​note>​ 
 +  ​* ​Now you need to save the result to a file. Grab and place on the sketch ​a **Save Lookup Table** and connect ​**Set Lookup Table** to it. Open **Save Lookup Table**, select a folder and write a suitable ​file name (e.g. high priority_cons_prot_areas_CO2.csv).
 \\ \\
 \\ \\
-The final model will look like this: +  * The final model will look like this: 
 \\ \\
 \\ \\
Line 114: Line 119:
 \\ \\
 \\ \\
-Mark the eye button ​at the top of “Save Lookup Table” to viewer ​the result ​hereafter+  * Save and run your model, click on eye button of “Save Lookup Table” to see the result. ​This functor output is a table that looks like this:
 \\ \\
 \\ \\
-Save your model (Disk button on the main tool bar) and then run it by clicking on the run button (blue arrow on the main tool bar)+{{ :imagem78.png?600 |}}
 \\ \\
 \\ \\
-Nowclick on eye button of “Save Lookup Table” to see the result. This functor output is table that looks like this:+===Congratulationsyou have successfully completed ​this lesson!===
 \\ \\
 \\ \\
-{{ :imagem78.png?​600 ​|}} +☞[[:lesson_10 ​Next Lesson]]
-\\+
 \\ \\
-Congratulations,​ you have successfully completed this lesson! Now let’s move to the **next lesson:​** ​[[lesson_10|LESSON 10: What are, what types and where are the submodels in Dinamica EGO?]]+[[:​guidebook_startBack to Guidebook Start]]