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-13 11:04 am] – ToDo unchecked: Write a tutorial using the sample data like CanoPy for dummies osmith | 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> | + | ===== Steps ===== |
- | ====CanoPy Tutorial==== | + | |
- | + | ||
- | Sample | + | |
- | + | ||
- | The sample data will contain folders titled ‘naip’, ‘data’, and ‘Blue_Ridge_Mountains’. 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 ‘Blue_Ridge_Mountains’ folder contains the outputs that are created by Textron’s Feature Analysis software for each QQ. This is included so if the user does not possess a Textron license they can still run the process on the sample data. | + | |
- | + | ||
- | Steps: | + | |
- Either clone the repository using Git in the terminal with the below code < | - Either clone the repository using Git in the terminal with the below code < | ||
- | | + | git clone https:// |
- | </ | + | </ |
* If you download the .zip file you will first need to unzip the file. It will be named ‘canopy-master’, | * 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. | - Download the CanoPy sample data from this page and extract it from its .zip format. | ||
Line 60: | Line 51: | ||
- Open the Python window under the geoprocessing pane located on the top bar within ArcMap. | - 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> | - 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(' | + | sys.path.append(' |
- | import canopy | + | import canopy |
- | </ | + | </ |
- Most functions in CanoPy only contain one parameter, '' | - Most functions in CanoPy only contain one parameter, '' | ||
- | canopy.assign_phyregs_to_naipqq() | + | canopy.assign_phyregs_to_naipqq() |
- | | + | </ |
* After it is finished the '' | * After it is finished the '' | ||
- | * The secondary purpose of '' | + | * The secondary purpose of '' |
- 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] |
- | | + | </ |
* If more regions were able to process you would assign those regions as such: <code python> | * If more regions were able to process you would assign those regions as such: <code python> | ||
phyreg_ids = [3, 7, 15] | phyreg_ids = [3, 7, 15] | ||
</ | </ | ||
- Next you will reproject all input NAIP tiles to the projection specified by the '' | - Next you will reproject all input NAIP tiles to the projection specified by the '' | ||
- | canopy.reproject_input_tiles(phyreg_ids) | + | canopy.reproject_naip_tiles(phyreg_ids) |
- | </ | + | </ |
* Reprojected tiles with the suffix ‘rm_’ will be saved to '' | * 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 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 '' |
canopy/tutorial.1584119062.txt.gz · Last modified: 2020-03-13 11:04 am by osmith