ArcPy<br />Desktop to the Cloud<br />Christopher Fricke<br />Geographic Information Services, Inc.<br />
Solutions Engineering<br />Doing the stuff you developers don’t want to do<br />Setting Up Environments & Installing Software<br />Testing!!!<br />Building Geoprocessing Scripts<br />
Signs of A GREAT Day<br />We just finished a data collection from a bunch of different installations.<br />Can you hook me up with a grid of what installations still owe what data?<br />
Signs of A GREAT Day<br />Hey so client X gave us these MXDs for some map services. The data sources are all over the place. <br />Can you do me a solid and set up these bad boys?<br />
Python is Baller<br />Tons of libraries<br />Code reusability<br />Setup data processing tasks<br />Automate environment installations<br />Simplify data maintenance<br />…<br />
Data Processing Tasks<br />
Automate Installations<br />
Automate Installations<br />30 Lines of Code<br />
Scheduled Tasks<br />Web FGDB<br />Turn Off Services<br />Refresh Data<br />Update Indexes<br />Turn On Services<br />Rebuild Caches<br />Email Alert<br />
Code Reuse<br />Web Site User<br />Power Desktop User<br />Store<br />5,000+ Stores<br />Code Fu<br />Store<br />Code Fu<br />Store Trade Area<br />Store Trade Area<br />
Printing / Reports<br />Desktop Tool Quick Report<br />
Printing / Reports<br />Web Printout<br />Text<br />
Python Saves the Day<br />
Hello my name is Christopher and I am a solutions engineer for GIS Inc.
People often look at my business card and say, “Wait up. What exactly is a Solutions Engineer”So here is a basic breakdown of my everyday week.40% of the time I’m doing cool stuff like setting up ArcSDE, ArcGIS Server, fixing IIS, and showing clients how to do all the fun stuff so that your apps work30% of the time I’m writing Geoprocessing Tools to add functionality to the stuff you do on the web20% of the time I’m testing software. GAAHHHH!Finally 10% of the time I’m doing the stuff you developers don’t want to do. This 10% of my time often feels like 90% of my time.
Data collections are fun. Sifting through whatever people had on hand to send is a fantastic way to start the week. Psyche!
This is sooo frustrating. You have a map document that looks AMAZING, only to realize that all those Scale Dependency enhanced uber layers are mapped to the wrong drive. Time to sit down for an hour and fix some data sources!
These are a couple of things that lead me to learn python a little over six months ago. There is no way in heck I want to bunker down and fix data sources for an hour when I could be spending that time doing ANYTHING else. Like hiking a mountain!
Python is the secret sauce in the ESRI big mac. You can write your own libraries or load in other peoples. Use the ArcPy API to create your own GP or Data processing tasksWrite functions for the desktop and reuse them on server
Esri’s Scripting Language of ChoiceGeoprocessing script hooks into arctoolboxBuilt into ArcGIS DesktopDocumentation on Tool Page in ESRI Resource Center
Our web application required a dot density map generated whenever the client loaded new point of sale data per each store. We built a script to build dot density points representing sales in thousands of dollars from a tabular input point of sale dataset.
So it is Friday afternoon when I got a phone call. “Hey man, you get those services published yet to our cloud instance?”I double check the clock. OH SNAP, it’s 4:30 and I have a hockey game to get to.
With 30 lines of code, about 15 minutes, and a bag of Swedish Fish I was ready to roll for the weekend.
Scheduled TasksCopy DataUpdate IndexesUpdate CacheEmail Alert
With only a few adjustments you can take a process used on the desktop and push it to ArcGIS ServerExample: - Power user runs thousands of trade areas - Web site user runs single trade areaCaveats:Feature Classes -> Feature SetsTables -> Record SetsAdjust Feature Set / Record Set Schema
Template Outputs for the DesktopOpen ToolboxDrag Feature LayerReport pops out
Really high quality prints from the web!ArcPy.Mapping module allows user to add in their own markups to a print out. Text, Lines, Polygons, Points are all good.Caveats:* Symbology is a bit wonky. Symbology must already exist in a layer file in order for it to display
Learning Python has opened up a lot of opportunities with developing geoprocessing tasks and assisting my clients much more efficiently. But more importantly it has made the work I already do much easier. Instead of hand jamming on the computer all day, I can do the things I really enjoy at work… like go on a hike.