djangodocs.org

1413 sections across all versions Narrow to Django 6.0 (current) →

overlaps_right

Reference GIS QuerySet API Reference Spatial Lookups

Availability: PostGIS, PGRaster (Bilateral) Tests if the geometry field’s bounding box overlaps or is to the right of the lookup geometry’s bounding box. Example: PostGIS equivalent:

4.2 5.0 5.1 5.2 6.0

overlaps_above

Reference GIS QuerySet API Reference Spatial Lookups

Availability: PostGIS, PGRaster (Conversion) Tests if the geometry field’s bounding box overlaps or is above the lookup geometry’s bounding box. Example: PostGIS equivalent:

4.2 5.0 5.1 5.2 6.0

overlaps_below

Reference GIS QuerySet API Reference Spatial Lookups

Availability: PostGIS, PGRaster (Conversion) Tests if the geometry field’s bounding box overlaps or is below the lookup geometry’s bounding box. Example: PostGIS equivalent:

4.2 5.0 5.1 5.2 6.0

strictly_above

Reference GIS QuerySet API Reference Spatial Lookups

Availability: PostGIS, PGRaster (Conversion) Tests if the geometry field’s bounding box is strictly above the lookup geometry’s bounding box. Example: PostGIS equivalent:

4.2 5.0 5.1 5.2 6.0

strictly_below

Reference GIS QuerySet API Reference Spatial Lookups

Availability: PostGIS, PGRaster (Conversion) Tests if the geometry field’s bounding box is strictly below the lookup geometry’s bounding box. Example: PostGIS equivalent:

4.2 5.0 5.1 5.2 6.0

dwithin

Reference GIS QuerySet API Reference Distance Lookups

Returns models where the distance to the geometry field from the lookup geometry are within the given distance from one another. Note that you can only provide Distance objects if the targeted geometries are in a projected system.

4.2 5.0 5.1 5.2 6.0

Collect

Reference GIS QuerySet API Reference Distance LookupsAggregate Functions

classCollect(geo_field,filter=None)[source] Availability: PostGIS, MariaDB, MySQL, SpatiaLite Returns a GEOMETRYCOLLECTION or a MULTI geometry object from the geometry column.

4.2 5.0 5.1 5.2 6.0

filter() and exclude()

Topic guide Aggregation Aggregations and other QuerySet clauses

Aggregates can also participate in filters. Any filter() (or exclude()) applied to normal model fields will have the effect of constraining the objects that are considered for aggregation.

4.2 5.0 5.1 5.2 6.0

Topic guide Aggregation Aggregations and other QuerySet clausesvalues()

As with the filter() clause, the order in which annotate() and values() clauses are applied to a query is significant. If the values() clause precedes the annotate(), the annotation will be computed using the grouping described by the values() clause.

4.2 5.0 5.1 5.2 6.0

Aggregating annotations

Topic guide Aggregation Aggregations and other QuerySet clauses

You can also generate an aggregate on the result of an annotation. When you define an aggregate() clause, the aggregates you provide can reference any alias defined as part of an annotate() clause in the query.

4.2 5.0 5.1 5.2 6.0