how to maintain precision?
in
Programming Questions
•
3 years ago
Howdy;
I'm trying to implement a program that draws objects according to latitude and longitudes read from a kml file. Because the area over which I'm drawing is relatively small (ie one city), a great degree of precision in the coordinates is required. Here's a sample of the coordinates I'm dealing with:
- <coordinates>
- -113.442808503237,53.6048438750671,0
- -113.442833924505,53.6022101984654,0
- -113.442935216077,53.5996562420879,0
- -113.43884754156,53.5996087723271,0
- -113.43515332971,53.5995059467105,0
- double d = Double.parseDouble(h[l]) * 1000000000; // h[l] is a single coordinate in String form
- float f = (float) d;
-113421131776.000).
Any insight as to why my plan isn't working or suggestions of better plans would be very much appreciated.
Many thanks,
Josh
2