geom  为几何图形的坐标集合

1、获取两个几何对象间的距离ST_Distance(geometry, geometry)

  ST_Distance(a.geom::geography, b.geom::geography) length

2、如果两个几何对象间距离在给定值范围内,则返回TRUE ST_DWithin(geometry, geometry, float)

 ST_DWithin(a.geom::geography, b.geom::geography, float);

3、判断两个几何对象是否相等ST_Equals(geometry, geometry)

 ST_Equals(a.geom, b.geom)

4、判断两个几何对象是否相交 ST_Intersects(geometry, geometry)

  ST_Intersects(a.geom, b.geom)

5、获取两个几何对象相交的部分 ST_Intersection(geometry,geometry)

  ST_Intersects(a.geom, b.geom)

6、判断A是否被B包含 ST_Within(geometry A, geometry B)

  ST_Within(a.geom, b.geom)

7、判断A是否包含B ST_Contains(geometry A, geometry B)

  ST_Contains(a.geom, b.geom)

8、判断几何对象是否闭合ST_IsClosed(geometry)