If I'm doing it right, single precision float should be able to represent latitude and longitude to within about two meters.
If more precision than that is needed, you'll want to use "tr" to change periods (as well as commas) into spaces so that you get lines like: -112 3348783983763 36 1514008468736 100 Then filter for whatever range of integer latitudes and longitudes you're actually looking at. Then you should get 1 degree x 2^-24, better than a centimeter.
cheers Miller
On Thu, Dec 13, 2007 at 11:51:14AM -0500, marius schebella wrote:
hi, google earth uses a special format to save geo information data (kml files). I am trying to build a (simple) gem earth projector and read these files (and also some other file types...) The conversion should be easy, but precision might become a problem. this is a shape in kml file format (longitude, latitude, height)
<coordinates> -112.3348783983763,36.1514008468736,100 -112.3372535345629,36.14888517553886,100 -112.3356068927954,36.14781612679284,100 -112.3350034807972,36.14846469024177,100 -112.3358353861232,36.1489624162954,100 -112.3345888301373,36.15026229372507,100 -112.3337937856278,36.14978096026463,100 -112.3331798208424,36.1504472788618,100 -112.3348783983763,36.1514008468736,100 </coordinates> the precision is 16 digits, so I guess double float. does anyonw know, if opengl can handle that? or any quick ideas for how to approach that? marius.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list