Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Heath, I finished this project last Spring and have not worked GDAL again since. Thanks for the note about spaces; I will file that one away. Odd though, in my experience parsing parameters on a command line uses a specific syntax. Of course, you are using cutline where I was trying to align to an existing raster. That and you are using the %s token to substitute parameters where my quick-and-dirty early example used hard-coded pathnames. Good luck. Regards, Doug.
@MichaelStimson Michael, GDAL_Translate and Python are options. I have some training and experience with Python and ArcPy. However, this project is my first serious foray into QGIS and, end of fiscal draws nigh. There is not a lot time to learn the ins and outs of PyQGIS on this project. What would the code look like and where would I run it from?
The problem is that the reports do not have any spatial data. They are tables that say that this vessel on this day did this thing. The point of this tool would be to take the vessel ID and the date-time from the report and run a definition query followed by a zoom-to-layer to bring up the relevant vessel track in ArcMap to investigate what exactly the vessel did. Perhaps I can find some ArcObjects code for selecting records from tables with a mouse. It appears that at, 10.1 at least, ArcPy and ArcPy Add-ins do not offer a way to do this.
Yes, since reading your and Michael 's replies I spent the day reading up on ArcPy Add-ins. Thanks. However, every example I have looked at involved a mouse click returning map coordinates to select a feature for editing, select a feature from which to pull off attributes... So far, though I have not seen any way to to use a mouse click to select a record in a table. I am being forced to agree with Michael that it is going to ArcObjects to expose that. It has been some years since I last wrote any VB ArcObjects. Now it would have to be VB.NET ArcObjects.
alpha-btea-soup, Can you supply a little more detail about accessing a selected feature in a layer with a Python add-in button? I have read the ESRI documentation on ArcPy add-ins, introduced with ArcGIS 10. The documentation says that an add-in is required to generate an action in response to an event or when the mouse is used to interact with the diaplay. However, there is nothing in the Python add-in classes that speaks to selecting records in a table.
I suppose that there are limits to when dealing with Excel in ArcGIS. Let's say I import to a table in a file geodatabase, does that suggest any new approaches?
Mr. Adam, I can certainly import the Excel spreadsheet to table in a file geodatabase. Whatever the table format -- Excel or file geodatabase -- the challenge remains accessing in ArcPy a record selected with the mouse.