Chapter 1:
Quick Answers to Review Questions:
- #1: It is a general purpose language, free and open source, and works cross-platform (but this doesn’t typically matter for ArcGIS runs only on Windows).
- #2: It means that Python does not need compilation in binary before running.
- #3: Scripting is automating functionality in another program, while programming focuses more on the development of applications.
- #4: ArcGIS Pro uses Python 3. The current version at the time this book was written was Python 3.9.18.
- #5: Investing time and effort into learning Python is important because while it can take time to write scripts, in the end they can be used for repetitive tasks, or adjusted and reused for multiple projects, so automating some of your workflow saves time in the long run! Python also has a lot of other application so it’s a very transferable skill beyond ArcGIS.
- #6 The main goal of developing scripts for ArcGIS Pro is to automate a task that would typically need to be done manually.
Chapter 2:
Quick Answers to Review Questions:
- #1: Integrated Development Environment
- #2: Python is an interpreted language because when you enter commands they are interpreted and then carried out.
- #3: IDLE
- #4: Primarily IDLE and PyCharm in this book, but Microsoft Visual Studio and Eclipse are widely used for Python generally as well.
- #5: Syntax will always be the same for all editors, but there will be differences in how scripts are created, organized, and tested. IDLE is good for beginners and simpler scripts, but PyCharm has more functionality. PyCharm can handle multiple versions and environments, while IDLE needs a different version for each Python version and environment.
- #6: IDLE is installed by default with every Python installation and PyCharm needs to be installed by you. To access and configure IDLE if you have ArcGIS Pro on your computer all you have to do is navigate to a script, right-click, and hit “Edit with IDLE (ArcGIS Pro)” and it will automatically use the active ArcGIS Pro environment. PyCharm is a bit more complicated. Simply put — you need to Open a New Project and then set a Custom Environment (selecting conda and arcgispro-py3) when starting a new project. You can also set the interpreter for new projects going forward and change it for an existing project.
No questions from me this week! I have used PyCharm, IDLE, and Python before so this was all a good refresher!
Applications I Googled:
One of the applications I found was a python GIS flood tool. It uses “commonly available topographic data and commercial geographic information system” to make flood vulnerability mapping more accessible to communities where it might otherwise not be!
This is the example map they gave:
Source: https://www.usgs.gov/software/python-gis-flood-tool-pygft
This next one isn’t necessarily python related, but they used ArcGIS to simulate a Zombie outbreak, which way zombies would travel, and model where they would go next. They didn’t explicitly mention Python, but I have used Python and ArcPy for one of the methods they used (Buffer Analysis) so I’m sure it could be incorporated for further Zombie prediction in this area and beyond!
Source: https://www.esri.com/about/newsroom/arcuser/the-undead-liven-up-the-classroom/