what should be the data type of latitudes and longitudes in general
一般来说,纬度和经度的数据类型应该是什么
6 个解决方案
#1
In MySQL
, it should be Point
, so that you can run efficient SPATIAL
queries.
在MySQL中,它应该是Point,以便您可以运行有效的SPATIAL查询。
#2
For SQL Server 2000 and 2005, I've seen Numeric(15,10)
for each coordinate used most often although I cannot speak to the correctness of that.
对于SQL Server 2000和2005,我已经看到每个坐标最常使用的数字(15,10),尽管我不能说出它的正确性。
Sql Server 2008 has new spatial
data types. See here for more on those (its a little more than half way down the page).
Sql Server 2008具有新的空间数据类型。有关这些内容的更多信息,请参阅此处(它在页面的一半以上)。
#3
I would say double if you want to store them in separate columns.
如果你想将它们存储在不同的列中,我会说加倍。
#4
I have used varchar2(40) under Oracle.
我在Oracle下使用了varchar2(40)。
#5
Depends on the language/DB you are using. In general, its preferable to have it as float, in case of programming language. and NUMBER(x,y) in case of sqlplus.
取决于您使用的语言/数据库。一般来说,在编程语言的情况下,最好将它作为浮点数。在sqlplus的情况下为NUMBER(x,y)。
#6
in general int (on Intel x86 in 32bit mode) is sufficient (in 100 (")representation). sign is used to indicate N/S and E/W. brgds/gabriel
通常int(在32位模式下的Intel x86上)就足够了(在100(“)表示中)。符号用于表示N / S和E / W.brgds / gabriel
#1
In MySQL
, it should be Point
, so that you can run efficient SPATIAL
queries.
在MySQL中,它应该是Point,以便您可以运行有效的SPATIAL查询。
#2
For SQL Server 2000 and 2005, I've seen Numeric(15,10)
for each coordinate used most often although I cannot speak to the correctness of that.
对于SQL Server 2000和2005,我已经看到每个坐标最常使用的数字(15,10),尽管我不能说出它的正确性。
Sql Server 2008 has new spatial
data types. See here for more on those (its a little more than half way down the page).
Sql Server 2008具有新的空间数据类型。有关这些内容的更多信息,请参阅此处(它在页面的一半以上)。
#3
I would say double if you want to store them in separate columns.
如果你想将它们存储在不同的列中,我会说加倍。
#4
I have used varchar2(40) under Oracle.
我在Oracle下使用了varchar2(40)。
#5
Depends on the language/DB you are using. In general, its preferable to have it as float, in case of programming language. and NUMBER(x,y) in case of sqlplus.
取决于您使用的语言/数据库。一般来说,在编程语言的情况下,最好将它作为浮点数。在sqlplus的情况下为NUMBER(x,y)。
#6
in general int (on Intel x86 in 32bit mode) is sufficient (in 100 (")representation). sign is used to indicate N/S and E/W. brgds/gabriel
通常int(在32位模式下的Intel x86上)就足够了(在100(“)表示中)。符号用于表示N / S和E / W.brgds / gabriel