美文网首页地理大数据
Postgis 获取图层范围

Postgis 获取图层范围

作者: 木木111314 | 来源:发表于2022-02-11 16:13 被阅读0次

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

相关文章

网友评论

    本文标题:Postgis 获取图层范围

    本文链接:https://www.haomeiwen.com/subject/xdtzkrtx.html