class Union(geo_field)
Availability: PostGIS, Oracle, SpatiaLite
This method returns a GEOSGeometry
object comprising the union of every geometry in the queryset. Please note that use of Union
is processor intensive and may take a significant amount of time on large querysets.
Note
If the computation time for using this method is too expensive, consider using Collect
instead.
Example:
>>> u = Zipcode.objects.aggregate(Union(poly)) # This may take a long time. >>> u = Zipcode.objects.filter(poly__within=bbox).aggregate(Union(poly)) # A more sensible approach.
Please login to continue.