Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Postgis如何将jts转换为坐标_Java_Postgis - Fatal编程技术网

Java Postgis如何将jts转换为坐标

Java Postgis如何将jts转换为坐标,java,postgis,Java,Postgis,我的postgis数据库中的坐标格式为形状几何体: "0102000000020000000000000000000000000000000000000000000000000049400000000000005440" 如何在Java中转换坐标(x,y)?您可以使用PostGIS功能: SELECT path[1] AS number, st_x(geom), st_y(geom) FROM st_dumppoints( '01

我的postgis数据库中的坐标格式为形状几何体:

"0102000000020000000000000000000000000000000000000000000000000049400000000000005440"

如何在Java中转换坐标(x,y)?

您可以使用PostGIS功能:

SELECT path[1] AS number,
       st_x(geom),
       st_y(geom)
FROM st_dumppoints(
        '0102000000020000000000000000000000000000000000000000000000000049400000000000005440'::geometry
     );

 number | st_x | st_y 
--------+------+------
      1 |    0 |    0
      2 |   50 |   80
(2 rows)

多谢各位@LaurenzAlbe如果我只希望[0;0],[50,80]输入输出,那么相应地更改查询!