Agreed - the difference in coordinates between the two values amounts to
3/10,000's of a second, which is about 9 millimeters.  Most GPS devices
can't give accuracy to more than 5 meters!

It's also probably nicer storing GPS coordinates as numeric instead of
text, as then you can use some useful equations on your data set to work
out such things as which GPS coordinates fall within a certain radius of
a certain position (as many shop websites use on their "find your
nearest store" page).  Google API's website has some example functions
to do just this on SQL data stored as GPS floats.

Nick.

-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin
Sent: 30 November 2009 14:59
To: General Discussion of SQLite Database
Subject: Re: [sqlite] sqlite3 bind and insert double values


On 30 Nov 2009, at 2:05pm, Michael Lippautz wrote:

> 47.824669 / 47.824669167

Same number.  If you need better precision than that, declare the column
type as TEXT and bind your data as text.

But since you're using GPS coordinates I can tell you it's not
necessary.  That seventh digit in a GPS coordinate gives you more
precision than a GPS device can actually deliver.  No consumer GPS
device is going to quote you 47.8246690 in one place and 47.8246691 to
mean a different place.  So you don't need to worry about your rounding
error.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to