@Jim Jones 提供的答案非常有效。 PostGIS有什么不能做的吗? :)
我不想依赖 PostGIS
所以我尝试用 R 解决问题。我的方法:
我延长 bbox 的每个对角线并计算该对角线的方位角。基于该数据,我计算了 bbox 的新边缘点。它有点工作,但 bbox 的左侧看起来有点小。我认为某处有错误,但我还不知道在哪里。
xmin<- 11.555333537980914
ymin<- 47.76067947037518
xmax<- 11.995692579075694
ymax<- 48.281587762758136
###calculate bearing clockwise of diagonal for each corner of the BBOX
######## right bottom, left und top
######## left and bottom, right and top
######## left and top and right and bottom
######## right and top, left and bottom
##bearing(p1, p2, a=6378137, f=1/298.257223563)
bearing1 <- geosphere::bearingRhumb(c(xmax,ymin),c(xmin,ymax))
bearing2 <- geosphere::bearingRhumb(c(xmin,ymin),c(xmax,ymax))
bearing3 <- geosphere::bearingRhumb(c(xmin,ymin),c(xmax,ymin))
bearing4 <- geosphere::bearingRhumb(c(xmax,ymax),c(xmin,ymin))
#new bbox points
########################## left und top
########################## right und top
########################## right und bottom
########################## left und bottom
p1<- geosphere::destPointRhumb(c(xmin,ymax), bearing1, 10000, r = 6378137)
p2<- geosphere::destPointRhumb(c(xmax,ymax), bearing2, 10000, r = 6378137)
p3<- geosphere::destPointRhumb(c(xmax,ymin), bearing3, 10000, r = 6378137)
p4<- geosphere::destPointRhumb(c(xmin,ymin), bearing4, 10000, r = 6378137)
data<-rbind.data.frame(p1,p2,p3,p4)
xmin<-min(data$lon)
ymin<-min(data$lat)
xmax<-max(data$lon)
ymax<-max(data$lat)
cat(xmin,",",ymin,",",xmax,",",ymax)