osm_ways表中的length vs length_m

时间:2019-01-31 03:20:07

标签: postgresql postgis

PostgreSQL,postgis(在表中:berlin_ways),此表是通过导入berm osm生成的。

length和length_m之间有什么区别,它们各自的单位距离是多少?

berlin_ways

1 个答案:

答案 0 :(得分:1)

length以度为单位,意义不大。

length_m以米为单位。

使用样本表中的第一组坐标:

--(CRS unit, 4326, degrees)
select st_distance(st_makePoint(113.8543481,22.8171585),st_makePoint(113.8545562,22.8187095));
     st_distance 
---------------------
 0.00156489827464957
(1 row)


-- (cast to Geography, so meters)
select st_distance(st_makePoint(113.8543481,22.8171585)::geography,st_makePoint(113.8545562,22.8187095)::geography);
 st_distance
--------------
 173.08351329
(1 row)