Postgis 获取图层范围
获取外接盒子
select public.st_findextent('sde', 'bufferpoint','geom')
BOX(116.618698489044 34.6963323992209,116.620845471142 34.6973409448288)
获取外接范围多边形
select st_AsText(public.st_findextent('sde', 'bufferpoint','geom'))
POLYGON((116.618698489044 34.6963323992209,116.618698489044 34.6973409448288,116.620845471142 34.6973409448288,116.620845471142 34.6963323992209,116.618698489044 34.6963323992209))
获取外接坐标极值
select
public.st_xmin(box) as xmin,
public.st_ymin(box) as ymin,
public.st_xmax(box) as xmax,
public.st_ymax(box) as ymax
from(select box3d (public.st_findextent('sde', 'bufferpoint','geom')) as box) aaa
xmin |
ymin |
xmax |
ymax |
116.61869848904405 |
34.69633239922092 |
116.6208454711415 |
34.697340944828795 |
网友评论