Question

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 ...

Was it helpful?

Solution

Use the extent property.

It returns a 4-tuple comprising the lower left and upper right coordinates, respectively.

You can also use the envelope property if you want a Polygon object representation of the bounding box.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top