Wednesday, February 15, 2017

Substation Tour & Python Scripting

Hope everyone is having a good week!

Photo of a Substation (not the NAED Substation)
I was able to take a tour of the Substation! I certainly learned a lot of new information and was able to see first hand where the towns electrical supply comes from. Of course I did not see where the electricity is generated because that power comes from many miles away at a power plant. What I was able to see was how the Electric Department gets their electricity from the power lines running across the transmission towers that you commonly see along highways or fields. I was also able to see how the voltage gets stepped down to be transported locally and how everything is controlled. It is quite an involved process! I also got to see inside of a pole mounted transformer, and see how  the transformers are repaired and tested. There is a lot of work that has to be done to get the electricity to your home everyday. It is a lot more involved then I'm sure anyone has imagined. We take our electricity for granted, we don't realize the complexity and the dedication of hardworking men and women that it takes for us to simply turn on the light switch or stove or any appliance and to have it work. Touring the substation and seeing things first hand really gave me a better understanding of the work that it takes to get ample amounts of electricity to our homes and businesses.

Transmission Towers

In other news, I have been doing lots of Esri training on Python Scripting. I have completed the web courses and received certificates for the, "Basics of Python (for ArcGIS 10)", "Python Scripting for Geoprocessing Workflows", "Python for Everyone", and "Python Scripting for Map Automation".

 I have been working on these courses because while working with the photo attachments in the Collector App, my manager wanted to be able to export all of the photos into a folder and rename them based on the transformer that they belong to. Seems simple enough right? Well no. With Collector, there is currently no way to rename the photos. When looking at them in ArcGIS Online you have the ability to download the photos one by one, rename name them and then reload them to the map document...that's too much work and tedious. So I found through ESRI that there is a way to batch export all of the photos attachments in ArcMap using a python script. I loaded the script as a new tool in a toolbox and ran the script which produced a folder full of the photos! However the photos had the generic "attach1_photo1", "attach401_photo1" name, not descriptive at all!

Through the help of Esri technical support, my manager and I were able to find where in SQL Server the global id and attachment id's for the photos are located. With that information we are able to go into ArcMap, compare the relative global ids from the photos to the global ids of the transformers and rename the photo. We are sure that there has got to be a python script that can do that for us, but at the current moment we have no idea. In the meantime, I went through and manually changed the names of the photos to reflect the transformer it is attached to.

Once we have the Collector app fully up and running we're hoping to sit down with our IT department to see if they know of a way to automate the renaming of the photos. Let's hope that they can, I will keep you updated!

No comments:

Post a Comment