select st_astext(geom) where tableName;函數
wkt轉geometry st_geomfromtext(wkt,wkid)對象
geometry轉wkt st_astext(geom)table
獲取點對象x、y座標值 st_x(geom)、st_y(geom)ast
獲取線/面對象四至 st_xmin(geom)、st_ymin(geom)、st_xmax(geom)、st_ymax(geom)select
計算兩點之間距離 st_distance(geom,geom) / st_distance(wkt,wkt)tab
計算線的長度 st_length(geom) / st_length(wkt)集合
計算面積 st_area(geom) / st_area(wkt)di
緩衝區計算 st_buffer(geom,distance) / st_buffer(wkt,distance)ab
POINT(0 0) ——點LINESTRING(0 0,1 1,1 2) ——線POLYGON((0 0,4 0,4 4,0 4,0 0),(1 1, 2 1, 2 2, 1 2,1 1)) ——面MULTIPOINT(0 0,1 2) ——多點MULTILINESTRING((0 0,1 1,1 2),(2 3,3 2,5 4)) ——多線MULTIPOLYGON(((0 0,4 0,4 4,0 4,0 0),(1 1,2 1,2 2,1 2,1 1)), ((-1 -1,-1 -2,-2 -2,-2 -1,-1 -1))) ——多面GEOMETRYCOLLECTION(POINT(2 3),LINESTRING((2 3,3 4))) ——幾何集合