ST_MakePoint — 创建二维、三维或四维点。
geometry ST_MakePoint(
float x, float y)
;
geometry ST_MakePoint(
float x, float y, float z)
;
geometry ST_MakePoint(
float x, float y, float z, float m)
;
创建2D、3D Z或4D ZM点几何图形。
使用 ST_MakePointM 使用XYM坐标制作点。
虽然不符合OGC, ST_MakePoint
速度更快,精度更高 ST_GeomFromText 和 ST_PointFromText 。对于数值坐标值,它也更易于使用。
![]() | |
对于大地坐标, |
This function supports 3d and will not drop the z-index.
--Return point with unknown SRID SELECT ST_MakePoint(-71.1043443253471, 42.3150676015829); --Return point marked as WGS 84 long lat SELECT ST_SetSRID(ST_MakePoint(-71.1043443253471, 42.3150676015829),4326); --Return a 3D point (e.g. has altitude) SELECT ST_MakePoint(1, 2,1.5); --Get z of point SELECT ST_Z(ST_MakePoint(1, 2,1.5)); result ------- 1.5