Jack Ha
Jack Ha

Reputation: 21001

retrieve bounding box of a geodjango multipolygon object

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

Upvotes: 8

Views: 3854

Answers (1)

Justin Bronn
Justin Bronn

Reputation:

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.

Upvotes: 16

Related Questions