RECORDING LATITUDES AND LONGITUDES

A

Allen Browne

James W said:
What is the best data type and format to record latitudes and longtitudes?

Hmm. Not sure there's a one-size-fits-all answer to that question.

First would be to decide on a unit of measurement. Degrees and fractions
might be best for calculations: it's easy enough to display that as degrees,
minutes and seconds if you need to. Depending on calculations, you might
choose radians.

For a data type, the Double might be adequate for some situations, but is
subject to the accuracy problems that plague floating point data:
http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
So if you need to perform matching, the Decimal data type might be better.
It will also give you many more digits of precision, which would be
necessary for more precise measurements (e.g. GPS data.)

If you need help converting/displaying the data, handing the trig, or
working with great-circle distances, Microsoft released this neatcode.mdb
back in the Access 95 days:
http://support.microsoft.com/kb/148402

So the short answer to a short question might be Decimal data type, in
degrees.
 
A

a a r o n . k e m p f

SQL Server Geography datatypes.

it's new in SQL Server 2008.
and it integrates with MapPoint / Virtual Earth!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top