Hello list
I am in a bit of a bind right now, been looking at this a bit too long. I am hoping someone out there has tackled this sort of issue at some point. I am still using workstation version of ArcInfo, and most likely will be for the entirety of this project.....
Basically, I am looking for a way to go through a table and select the records that have a value for year that most closely matches the year a user specifies earlier on. I have a big file of transportation links with a unique A-B node combination, but there can be more than one year per A-B combination, so a group of records can have the same A-B and different years. There can, however, only be one year per A-B combination. Confused yet?
The aim is to select all the records that make up a transportation network for a given year. For example, if I want a 2005 network, I want to select each A-B combination that has a year closest to 2005. If 3 records are 2001,2002, and 2003 for the same A-B combination, I would want to select 2003 since it is the change that happens closest to 2003. The idea I have so far is to run statistics on the table (getting min and max year), and use the resulting stats table (with one record per A-B combination) as the basis for selecting links from the original table based on unique A-B combination, in a cursor or something. Then, in the cursor, select the A-B link ID, and somehow compare the years in the records that come up to ultimately determine which link to use for the given network year. This is where I need help! Is this sort of comparison possible, especially in a cursor or other sort of loop? In the past, when I have cycled through selected records in a cursor, and tried to add to the selection set and then tried to move to the next record in the cursor, it broke the cursor (I probably was doing something wrong). Sorry if my questions are not clear, I am finding it hard to explain everything I want to/ have to do with this. Any ideas, code samples, etc. on how to be able to select in this way would be very appreciated, or if you know this will not work, that is good to know too...........thanks! charlene -------------------------------------------------------- Charlene Howard Metropolitan Washington Council of Governments Washington, DC (202) 962-3384 charlene@mwcog.org <mailto:charlene@mwcog.org>
To unsubscribe, write to gislist-unsubscribe@geocomm.com ________________________________________________________________________ Setup a GeoCommunity Account and have access to FAST DataDownloads and Premium Career Posting at a discounted rate! https://www.geocomm.com/cgi-bin/accounts/login
On-line Archives available at http://spatialnews.geocomm.com/community/lists/
|