canopy:tutorial
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
canopy:tutorial [2020-03-05 05:40 am] – hcho | canopy: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 23: | Line 21: | ||
{{ : | {{ : | ||
- | ===== TODOs ===== | + | 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. |
- | <todo @owen>Write a tutorial using the sample data like CanoPy for dummies</todo> | + | ===== Steps ===== |
+ | |||
+ | - Either clone the repository using Git in the terminal with the below code <code> | ||
+ | git clone https:// | ||
+ | </ | ||
+ | * If you download the .zip file you will first need to unzip the file. It will be named ‘canopy-master’, | ||
+ | - Download the CanoPy sample data from this page and extract it from its .zip format. | ||
+ | - Make a copy '' | ||
+ | - Edit the new '' | ||
+ | - '' | ||
+ | - '' | ||
+ | - '' | ||
+ | - '' | ||
+ | - '' | ||
+ | - '' | ||
+ | - '' | ||
+ | - '' | ||
+ | - '' | ||
+ | - '' | ||
+ | - '' | ||
+ | * This will allow CanoPy to read the required data and create the required output paths for the data to be saved into. | ||
+ | - Open a new ArcMap 10.x document. | ||
+ | - Add the following files from the sample data folder to ArcMap. | ||
+ | - Physiographic_Districts_GA.shp | ||
+ | - naip_ga_2009_1m_m4b.shp | ||
+ | * You may notice these are the '' | ||
+ | - Open the Python window under the geoprocessing pane located on the top bar within ArcMap. | ||
+ | - After the Python window is open you must import the CanoPy module for ArcMap to be able to use its functions. To accomplish this use the following code. <code python> | ||
+ | import sys | ||
+ | sys.path.append(' | ||
+ | import canopy | ||
+ | </code> | ||
+ | - Most functions in CanoPy only contain one parameter, '' | ||
+ | canopy.assign_phyregs_to_naipqq() | ||
+ | </ | ||
+ | * After it is finished the '' | ||
+ | * The secondary purpose of '' | ||
+ | - Next you will assign the phyreg_ids, which in our case will be:<code python> | ||
+ | phyreg_ids = [3] | ||
+ | </ | ||
+ | * If more regions were able to process you would assign those regions as such: <code python> | ||
+ | phyreg_ids = [3, 7, 15] | ||
+ | </ | ||
+ | - Next you will reproject all input NAIP tiles to the projection specified by the '' | ||
+ | canopy.reproject_naip_tiles(phyreg_ids) | ||
+ | </ | ||
+ | * Reprojected tiles with the suffix ‘rm_’ will be saved to '' | ||
+ | - The reprojected tiles in the Inputs folder will be used in as the inputs with Textrons Feature Analyst, however we are skipping that step, so you will want to move the '' | ||
+ | * The folder structures should now look like this:{{ : | ||
+ | - After the ' | ||
+ | canopy.convert_afe_to_canopy_tiff(phyreg_ids) | ||
+ | </ | ||
+ | - '' | ||
+ | * Ensures all tiles are TIFF files with the values of 0 & 1. Files have prefix of ' | ||
+ | - '' | ||
+ | * Clips all tiles to the outline of their QQ to remove all edge artifacts (errors along edge of file) and make mosaicing more accurate. Files have prefix of ' | ||
+ | - '' | ||
+ | * Mosaics all clipped tiles to the shape of their physiographic region and clips the mosaic to the physiographic region boundaries. | ||
+ | - After running the final wrapper function the outputs folder will contain all intermediate and final 2-bit output Canopy TIFFS. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ |
canopy/tutorial.1583412005.txt.gz · Last modified: 2020-03-05 05:40 am by hcho