float and double datatype is good to store latitude and longitude?

Viewed 33657

I am storing latitude and longitude at the server side (JAVA Platform).

To store those values, I am using float and double datatype at the server side. I came to know that float and double are not a recommended primitive datatypes (which is not recommended to use currencies in professional way), because float and double having rounding precision problem.

In my case, I am just comparing the stored coordinates (latitude and longitude) at the server side.

Question 1:

Comparing the coordinates with the datatypes (float or double) will make any problem in future?

Question 2:

Using big decimal is good? or Going with float or double is safer?

3 Answers
Related