GitHub-OtherCursors

所属分类:GIS/地图编程
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2023-11-07 17:35:34
上 传 者sh-1993
说明:  堪萨斯州立大学地理分析GEOG 728编程练习
(Exercise for GEOG 728 Programming for Geographic Analysis at Kansas State University)

文件列表:
GitHub-OtherCursors.py (317, 2023-11-07)
GitHub-OtherCursors.zip (1637536, 2023-11-07)
LICENSE (7048, 2023-11-07)
demo11_1.py (696, 2023-11-07)
demo11_2.py (1027, 2023-11-07)
demo11_3.py (848, 2023-11-07)
demo11_4.py (973, 2023-11-07)
demo11_5.py (1444, 2023-11-07)
demo11_6.py (1155, 2023-11-07)

# GitHub-OtherCursors Exercise for GEOG 728 Programming for Geographic Analysis at Kansas State University ### Instructions: Accept the GitHub Classroom assignment GitHub-OtherCursors and clone the new repository as a local personal repository. Uncompress the provided ZIP file to access the ArcGIS Pro project file in your local repository workspace. The only file which needs to be pushed to origin at the conclusion of the exercise is a single Python script. There is no requirement to prepare and submit a script-based tool. Should you encounter difficulties during the week, seek assistance by posting an issue in GitHub. ### Task: Edit the provided Python file called GitHub-OtherCursors.py to create a new stand-alone script that includes the following features and capabilities. For this script, there is no requirement to include user-defined inputs or any messaging, except for a custom print message should your script throw an exception (see the requirement below for a "try-except" block): 1. Incorporates an insert cursor to add five new observations of lesser prairie chickens to the existing feature class tympanuchus_pallidicinctus. 2. Uses the Python fileinput module and related methods to read in the new observations in the provided text file newchickens.txt. 3. Incorporates an update cursor to add the species name *Tympanuchus pallidicinctus* to the "label" field, x- and y-coordinates of each observation to the "long" and "lat" fields, and a value of 1 to the "abundance" field of the new records in the final output. 4. Finishes by computing a minimum bounding polygon as a rough estimate of the species range. For this, use the function [arcpy.management.MinimumBoundingGeometry](https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/minimum-bounding-geometry.htm) using the geometry type CONVEX_HULL. Read the tool help file for this function closely, as it may have special licensing or extension requirements to account for in your script. 5. Includes at least one "try-except" block to trap geoprocessing errors. Also include in your script a section that establishes the following three, and only these three, local variables. Modify the path to the inFile variable so it works properly on your computer. inFile = "D:/GitHub/GitHub-OtherCursors/newchickens.txt"
inFc = "tympanuchus_pallidicinctus"
pt = arcpy.Point() After a successful run, your script should produce a modified version of tympanuchus_pallidicinctus that includes the correct geometry for the five new observations and their required attribute field values...as well as a new feature class containing the minimum bounding geometry polygon for all lesser prairie chicken locations. ## Rubric: Review the assignment rubric available on Canvas for additional details on how your work will be assessed. Double-check that your script includes a complete header section, uses good commenting, incorporates line spaces between blocks of code, and reads input and writes output to current workspace. ## Submission: Commit your code changes for GitHub-OtherCursors.py to your assignment repository on GitHub.

近期下载者

相关文件


收藏者