Thanks everyone. I have been thinking on other line. May be if you guys can see through the idea I have and suggest if it may or may not work. Although I know that the size of states varies and I know some states are way bigger than others. So what if we make up some thing in DB or something that may define the max size of the size in area and minimum one in other row. And now calculations can take place based on adding few latitudes (1 latitude degree is 67 miles or so if I remembering correctly). So may be that can be used to calculate ? What do you guys think on this ?
Thanks for all the input (Cerebrus, Joe, Brandon, CallMeLaNN and others who are helping me. You guys are awesome) On Sat, May 16, 2009 at 1:40 PM, Cerebrus <[email protected]> wrote: > > No, I don't think that method would work. It relies too much on > chronology. You would end up with problems even during data input. > > I'm thinking of a class that needs data for each state to be fed once > in the following manner : > > State: KS > Neighbours: CO, OK, MO, NE > > State: NE > Neighbours: WY, CO, KS, MO, IA, SD > > and perform lookups on the Neighbour values based on any State key... > something like a NameValueCollection (which would work, but read > on...) > > What I'm not too happy with is the duplication. I'd be happier if I > could think of something by which the class would recognize that if KS > is a neighbour of NE, then NE is a neighbour of KS. > > On May 16, 10:09 pm, Brandon Betances <[email protected]> wrote: > > Assign every state a number geographically. Start with Maine, assign it > #1, > > Vermont #2, NH #3, etc. Then when you input a state, lets use Rhode > Island > > which would be #5, #4 (Massachussets), and Connecticut (#6), would have > to > > be adjacent to the state in question. Rough solution, but it could work > with > > a bit of planning. If California is #47, then #46 Nevada and #48 Oregon > > should pop up as neighbors. You might run into problems with Alaska and > > Hawaii however, so just make sure #49, 50 and 51 (Puerto Rico) don't have > > any neighbors. Lemme think about this a bit more at work tonight and ill > let > > you know what I come up with. >
