ArcGIS 10
I’m in the process of rewriting a process, moving most of the processing from arcpy to postgresql-enabled python (love me some psycopg2).
One of the QC checks I’m doing at the end of this re-write is just verifying that the feature class schemas are the same (or that the differences are intended) under the new process as they were in the old process.
And while ArcGIS does have a good tool for this, there were a couple tweaks I wanted to make.
This Friday Fave is more for utility than pleasure.
Unfortunately, I have been working to determine why my views and query layers perform so much worse than directly accessing my feature class.
My Googling led me to Geodatabase Geek, by Trevor Hart, Eagle Technology Group Ltd. Trevor has some real good information about Geodatabases and also gave a good lightening talk on Usage Reporting on ArcGIS 10.1 for Server at the 2013 ESRI International Developer’s Conference.
I’ve found that sometimes I can not find the answer to a question until I know the answer & then it becomes ridiculously easy to find the answer.
One small annoying thing that I never spent much time was when you delete features from a feature class making it significantly smaller but the envelope does not get re-sized so the zoom extent (still the original extent) is too large. This often happens to use when we convert tables to an XY theme and there are blank records–most of our data shows in Minnesota but there are some in Oklahoma (I think).
Question: How do I get ArcMap to automatically pan through an area.
As I mentioned in a previous post, I recently had the need to have ArcMap automatically pan through a project area. My first attempt was to print a series of data-driven pages (using a fishnet polygon layer as the index) this but that did not accomplish what I needed so I switched to arcpy, which made the task simple enough.
I recently had an internal request to capture and store the Bing imagery for an area for future use. The user was interested in some specific images that were taken after a fire, making the ground surface-and certain geological features-much more visible. His concern was that in the future this imagery might get replaced with updated imagery taken when the vegetation has grown back.
Since it is unknown when/how this data might be used by us, we mostly wanted to capture it now & find a way to use it.
Seems like a lot of people are finding the ArcMap Field Calculator examples that I have posted useful so I will make an effort to post more of them. Most posts are generated after I do something and think that others might want to know how to do it. (Or so I can go back and remember how I did something without re-inventing it).
Something I did today was create a field (!
Apparently, if you post one time about ArcMap field calculator, you’re bound to get additional questions. After my recent post about using field calculator to convert text values to numeric, someone asked about a problem they were having with another calculation they were having.
The underlying problem was that python 2.6, which is installed with ArcGIS 10, uses integer division when both the numerator and denominator are integers. The result of integer division is an integer rounded towards negative infinity.
Received a request yesterday asking how to use the ArcMap Calculator to copy values from a Text field to a Double field using python syntax. As any good blogger would do, I immediately thought, ‘Awesome! Someone’s question is the perfect topic for a new blog post’.
The python parser is actually pretty good at casting values on the fly so if the values in your text field (!Day! in my example) are valid values that can be converted to a Double value, it is as simple as just setting the formula to be the text field.
Almost a year ago, I updated ERSI’s Domain Sort code for VB 6 to work with ArcGIS 10. Recently, I had a comment that this Add-In caused ArcCatalog to explode if you had an open OLE connection. When I tested it, it turned out the reports were accurate.
I got around to adding in a Try-Catch around the offending chunk of code & it is now better than ever. You can download just the Add-In or the Add-In with source code or get it from ESRI’s ArcGIS Resource Center.
One of the standards in our databases is to store dates as 8-digit integer values in the format of yyyymmdd. This requires us to occasionally convert values from date fields into this format.
We can do this in the ArcMap Field Calculator using this arcpy function:
def datetodouble(inNum): splitList = str(inNum).split("/") return splitList [2] +("0"+ splitList [0])[-2:] +("0"+ splitList [1])[-2:]