CLAWRIM Wiki

Computing Lab for Advanced Water Resources Informatics and Modeling

User Tools

Site Tools


canopy:tutorial

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
canopy:tutorial [2020-03-13 11:15 am] – Fix code blocks osmithcanopy:tutorial [2020-04-19 08:49 pm] (current) hcho
Line 14: Line 14:
   * ArcPy   * ArcPy
   * Python 2 standard module: os   * Python 2 standard module: os
-  * Feature Analyst(tm) by the Textron Systems 
-  * Automated Feature Extraction (AFE) models trained using Feature Analyst 
  
 We are currently planning on developing a fully open source solution without using ArcGIS and Feature Analyst. We are currently planning on developing a fully open source solution without using ArcGIS and Feature Analyst.
Line 22: Line 20:
  
 {{ :canopy:canopy_sample_data.zip |}} {{ :canopy:canopy_sample_data.zip |}}
- 
-===== TODOs ===== 
- 
-<todo @owen #osmith:2020-03-13>Write a tutorial using the sample data like CanoPy for dummies</todo> 
- 
-===== CanoPy Tutorial For Dummies ===== 
- 
-**Sample  Data Contents:** 
  
 The sample data will contain 3 folders titled ‘naip’, ‘data’, and ‘Outputs’. The ‘data’ folder contains the Georgia physiographic regions shapefile, the NAIP Quarter Quad (QQ) polygon shapefile in addition to the TIFF file which will be used for snapping. The ‘naip’ folder will contain 4 input QQ NAIP tiles that form a 2 x 2 area. The ‘Outputs’ folder contains the outputs that are created by Textron’s Feature Analysis software for each NAIP QQ in the sample dataset. This is included as this tutorial does NOT go over the process of using Textrons Feature Analyst but rather the process of using the CanoPy Python module. The sample data will contain 3 folders titled ‘naip’, ‘data’, and ‘Outputs’. The ‘data’ folder contains the Georgia physiographic regions shapefile, the NAIP Quarter Quad (QQ) polygon shapefile in addition to the TIFF file which will be used for snapping. The ‘naip’ folder will contain 4 input QQ NAIP tiles that form a 2 x 2 area. The ‘Outputs’ folder contains the outputs that are created by Textron’s Feature Analysis software for each NAIP QQ in the sample dataset. This is included as this tutorial does NOT go over the process of using Textrons Feature Analyst but rather the process of using the CanoPy Python module.
  
-**Steps:**+===== Steps =====
  
   - Either clone the repository using Git in the terminal with the below code <code>   - Either clone the repository using Git in the terminal with the below code <code>
Line 69: Line 59:
 </code> </code>
     * After it is finished the ''naipqq_layer'' will now contain the '' naipqq_phyregs_field'' which will be titled ‘PHYREGS’ in this case. Each NAIP QQ will now have the region id’s of each region it is in.      * After it is finished the ''naipqq_layer'' will now contain the '' naipqq_phyregs_field'' which will be titled ‘PHYREGS’ in this case. Each NAIP QQ will now have the region id’s of each region it is in. 
-    * The secondary purpose of ''canopy.assign_phyregs_to_naipqq'' is to calculate the area in square kilometers of each physiographic region. The ''phyregs_layer'' will now contain the '' phyregs_area_sqkm_field'' which will be titled ‘AREA_SQKM’. The ‘AREA_SQKM’ field will be used with the ''generate_ground_truthing_points'' function. +    * The secondary purpose of ''canopy.assign_phyregs_to_naipqq'' is to calculate the area in square kilometers of each physiographic region. The ''phyregs_layer'' will now contain the '' phyregs_area_sqkm_field'' which will be titled ‘AREA_SQKM’. The ‘AREA_SQKM’ field will be used with the ''generate_gtpoints'' function. 
   -  Next you will assign the phyreg_ids, which in our case will be:<code python>   -  Next you will assign the phyreg_ids, which in our case will be:<code python>
 phyreg_ids = [3] phyreg_ids = [3]
Line 77: Line 67:
 </code> </code>
   -  Next you will reproject all input NAIP tiles to the projection specified by the '' spatref_wkid'' in ''canopy_config'' which will be [[https://spatialreference.org/ref/sr-org/usa-contiguous-albers-equal-area-conic-usgs-version-landfire/|WKID-102039: USA Contiguous Albers Equal Area Conic USGS version.]]. Use the following code to use the reprojection function<code python>   -  Next you will reproject all input NAIP tiles to the projection specified by the '' spatref_wkid'' in ''canopy_config'' which will be [[https://spatialreference.org/ref/sr-org/usa-contiguous-albers-equal-area-conic-usgs-version-landfire/|WKID-102039: USA Contiguous Albers Equal Area Conic USGS version.]]. Use the following code to use the reprojection function<code python>
-canopy.reproject_input_tiles(phyreg_ids)+canopy.reproject_naip_tiles(phyreg_ids)
 </code> </code>
     * Reprojected tiles with the suffix ‘rm_’ will be saved to ''.../CanoPy_sample_data/2009 Analysis/Blue_Ridge_Mountains/Inputs'' which will have been created by the function.     * Reprojected tiles with the suffix ‘rm_’ will be saved to ''.../CanoPy_sample_data/2009 Analysis/Blue_Ridge_Mountains/Inputs'' which will have been created by the function.
canopy/tutorial.1584119731.txt.gz · Last modified: 2020-03-13 11:15 am by osmith

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki