Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
BCM
User Panel

Posted: 10/9/2021 1:46:10 PM EDT
So this last semester I have been taking a coding class actually the last in the concentration for my major. There are two weeks left in the course and the final two projects are a bit of a doozy. I was wondering if there are any of you out in ArfLand that are decent with Python or have any experience? The entirety of the class has been in Python 2.x if that helps any.

A preview of what im looking at for the week 7 scripting project,

Prompt: You are a GIS intern in a land-holdings company. The property owned by the company has been surveyed and the data is housed in text files on the company server. Impress your superiors by writing a Python script that creates polygons from these files.
View Quote
And for the final project which is also due this week

You have recently been hired as a GIS analyst for a medium but growing city. The rapid expansion has overstressed much of the city's infrastructure. As a result
the city has begun large-scale upgrading efforts. Your boss has given you the responsibility of updating the city GIS with information on pipe and conduit projects
ongoing throughout the area. Each day several reports are generated to update you on progress being made. The reports include the name of the line,
coordinates of the line, and other important information such as pressure ratings and materials transported. You need to, on a daily basis, update these features
in the GIS and perform analysis on the new features. Some of the pipeline is being laid in areas where future growth is planned. You must create a 25-foot buffer
around all lines containing gas or power lines. This will be used as an exclusion area for future digging. The buffer should then be merged into a file used for
future planning.
You will build a custom ArcGIS tool to create the buffer and append it into the planning file. You may simply want to build the tool to allow for inputs and
outputs to be defined by the user at the time the tool will run. You should then write a script that will find all new reports in a group of files, create new features
from these reports, and then use these features as the input in your recently created tool. Make sure that all data found in the reports is accurately recorded to
the newly created features. This will allow you to complete your daily updates and append the planning file without the need to do anything manually. You could
even set this program to run at a specific time and your work could do itself while you have a cup of coffee! Your predecessor clearly had the same idea as you,
but his programming skills may have been lacking. He has begun a script to find the reports, but some mistakes are clear. You will need to fix the existing script
and expand it to meet your needs.
When completed, your boss would like to see all your work, so you will create a report that includes the tool, script, a copy of all shapefiles or geodatabases
created using the script, and a screenshot of your updated GUI (toolbars and toolbox). You will conclude your report with a written narrative to your boss
explaining your development process in creating the tool and script, as he would like to see this process and ensure the tool and script are functional
View Quote


Link Posted: 10/9/2021 6:39:35 PM EDT
[#1]
find the right import libs and it should take a few days.
I've never had to do any graphics, just automate calling a bunch of other servers to do stuff for me and then integrating it all at the end.
Link Posted: 10/16/2021 4:12:44 PM EDT
[#2]
It took me all week and some assistance from some of the dudes I work with but I think I figured it out..
Link Posted: 11/14/2021 1:43:31 AM EDT
[#3]
Pretty cool exercise. I have used Pandas a lot, but never had to draw any polygons. Just charting.
Link Posted: 11/14/2021 1:48:45 AM EDT
[#4]
Why are they still teaching python 2.x? It's not installed in most environments anymore.


Link Posted: 11/14/2021 9:03:39 PM EDT
[#5]
Snek 2.7 was end of life over a year ago.
Link Posted: 11/21/2021 7:27:20 PM EDT
[#6]
I think it is because not a lot of institutions have moved on to ArcPro. 10.8 Just received its last update and is going to be allowed to fade into darkness..
Close Join Our Mail List to Stay Up To Date! Win a FREE Membership!

Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!

You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.


By signing up you agree to our User Agreement. *Must have a registered ARFCOM account to win.
Top Top