地理大数据

Postgis 获取图层范围

2022-02-11  本文已影响0人  木木111314

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
上一篇下一篇

猜你喜欢

热点阅读