Subject Re: [firebird-support] Recommended floating-point type for latitude and longitude
Author Ann W. Harrison
Daniel Albuschat wrote:
> Hello there,
>
> I'd like to save global latitude and longitude data in my database,
> which can look like this:
> Longitude: 7.33220348221289
> Latitude: 51.1492514558089
>
> My best guess is using numeric(18,2) and always multipy the value by
> 10000000000 before
> storing it to the database, but I'd like to hear your opinion on this.
>

I'd use double precision floating point, because latitude and
longitude are measured, not counted. However, if you're prepared
to limit the precision to fifteen decimal places, you could use
(18, 15). Internally,that's stored as a 64 bit integer.


Regards,


Ann