【发布时间】:2015-07-19 08:34:35
【问题描述】:
所以在 PostgreSQL 中,我有一堆用于 long/lat 的几何值,其格式如下:
0101000020E610000095B9F94674CF37C09CBF0985083B5040
所以在 Postgres 中,我可以进行选择查询来格式化所有内容。
SELECT ST_AsText(position_geom)FROM reports;
所以我在eclipse 中安装了 postgreSQL 和 PostGIS JDBC 驱动程序,并认为我可以做类似的事情
rs = stmt.executeQuery("SELECT ST_AsText(*)FROM reports");
while(rs.next()){
String geomVal = rs.getString("position_geom");
System.out.println(geomVal);}
但我收到一个错误:
function st_astext() does not exist.
我已经导入了所有的postGIS 扩展,只是想知道是否有人有想法。
【问题讨论】:
标签: java eclipse postgresql postgis