On Mar 30, 2009, at 5:07 PM, Tobias Zimmerman wrote:
I am starting a new project that involves simulating various US election results. I want to plot the results using an election map similar to the ones that were all over the web during last year’s election. However, Iwould like to do this in Cocoa/Objective-C rather than having to learn Python or Java.
I did something, java sorry, based on... http://www.cs.princeton.edu/introcs/35purple/ which for the mapping uses...
Data sources. We collect state and county border data from the US Census TIGER database. [ documentation ] The file USA.txt contains each state (in the Continental US) and its corresponding polygon (s). There are 104 polygons in total. The files NJ.txt contain each county in the given state. There are 3325 polygons in total over all states.
If you look at the java you can see how it's routines for drawing and filling, etc. the polygons work. It was a little buggy in translating mouse position to map coordinates as I remember. Which I wanted for displaying little tooltip type popup windows when you did mouse over states or counties. For one thing to display the state or county name which it had no provision for and I didn't try to add. You probably would have to rework that if you went with ObjC anyhow.
I still haven't finished to final result version of mine but the shareware version for the 2008 presidential elections is at...
http://www195.pair.com/mik3hall/It didn't exactly make me wealthy and I was a little disappointed in not even getting much feedback. But it had some downloads and I'd still like to find the time to come up with a final 2008 version and maybe add some other political content of some sort. Something with information on what's up in Washington that would allow for some degree of user interaction to make users views and opinions part of the software somehow.
Mike Hall hallmike at att dot net http://www.geocities.com/mik3hall http://sourceforge.net/projects/macnative
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com