检索geodjango多边形对象的边界框 [英] retrieve bounding box of a geodjango multipolygon object
本文介绍了检索geodjango多边形对象的边界框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在geodjango中获得MultiPolygon对象的边界框?在API http://geodjango.org/docs/geos.html 中找不到任何内容...
How can I get the bounding box of a MultiPolygon object in geodjango? Can't find anything in the API http://geodjango.org/docs/geos.html ...
推荐答案
使用 范围
属性.
它返回一个分别由左下坐标和右上坐标组成的4元组.
It returns a 4-tuple comprising the lower left and upper right coordinates, respectively.
您还可以使用 信封
属性,如果您想要边框的 Polygon
对象表示形式.
You can also use the envelope
property if you want a Polygon
object representation of the bounding box.
这篇关于检索geodjango多边形对象的边界框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文