【发布时间】:2013-11-24 14:09:39
【问题描述】:
在带有 postgresql-9.2.4 和 postgis-2.0.3 的 Slackware 14.0 x86_64 上。 已将 essex-latest.osm.pbf 加载到数据库中。
我想到达埃塞克斯的道路中心,但遇到了问题。 这些工作正常:
SELECT st_Extent(way), st_area(st_Extent(way)) from planet_osm_roads;
st_extent | st_area
------------------------------------------------+------------------
BOX(-10979.62 6693910.54,144349.79 6822695.15) | 20004037488.3802
SELECT center(box '((-10979.62, 6693910.54),(144349.79, 6822695.15))');
center
-------------------------
(66685.085,6758302.845)
(但我想知道为什么函数是中心而不是st_center)。
无论如何,为什么这不起作用:
SELECT center(st_Extent(way)) from planet_osm_roads;
ERROR: function center(box2d) does not exist
LINE 1: SELECT center(st_Extent(way)) from planet_osm_roads;
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
干杯, 彼得
【问题讨论】:
标签: postgresql postgis