which plots a comma separated list of GPS locations on a world map 2D projection. I've been searching for a method to plot these points while only showing the continental U.S. I've read through Ben Fry's methodology on the subject and tried to rebuild what he had and I screwed up along the way. I'm very new to programming in general. I think I will be able to do this if I change this part of the code somehow:
x = int(((180+mapY)/360)*width);
y = int(height - ((90+mapX)/180)*height);
I'm really running out of ideas though. I've tried many different things. If anyone has any solution to this problem, it would be wonderful.
In my code I'm using this function on an array of floats. The number returned is "30E7". When I change the actual max number in the array to something like 300000001, 30E7 is still returned. How do I make the number returned the actual number? It must have something to do with rounding...
I'm having some major problems with grabbing data from a very large XML data file. Within the code there are 3000 <Filing> tags. My code successfully pulls the Address attribute from the child tag <Registrant> and outputs the values to a text file. The problem is that the code refuses to cycle through all 3000 filings and only returns 2835 strings. Furthermore when I try to retrieve a different attribute from the xml, such as Amount, the code returns a seemingly arbitrary total of 1995 strings and even stops writing the string mid write. (The value is 40,000 and in the output it is 40).
My code looks like this:
---
XMLElement xml;
String Address;
PrintWriter output;
void setup(){
output = createWriter("addresses.txt");
xml = new XMLElement(this, "2011_1_1_1_fnr.xml");
int numFilings = xml.getChildCount();
String[] addressArray = new String[numFilings];
XMLElement[] children = xml.getChildren("Filing");