djangodocs.org

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

overlaps_left

Reference GIS QuerySet API Reference

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

dev

overlaps_right

Reference GIS QuerySet API Reference

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:

dev

overlaps_above

Reference GIS QuerySet API Reference

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:

dev

overlaps_below

Reference GIS QuerySet API Reference

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:

dev

strictly_above

Reference GIS QuerySet API Reference

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

dev

strictly_below

Reference GIS QuerySet API Reference

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

dev

Distance Lookups

Reference GIS QuerySet API Reference

Availability: PostGIS, Oracle, MariaDB, MySQL, SpatiaLite, PGRaster (Native) For an overview on performing distance queries, please refer to the distance queries introduction.

dev

dwithin

Reference GIS QuerySet API Reference

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.

dev

Collect

Reference GIS QuerySet API Reference

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

dev

Spatial Lookups

Reference GIS QuerySet API Reference

The spatial lookups in this section are available for GeometryField and RasterField. For an introduction, see the spatial lookups introduction. For an overview of what lookups are compatible with a particular spatial backend, refer to the spatial lookup compatibility table.

4.2 5.0 5.1 5.2 6.0

bbcontains

Reference GIS QuerySet API Reference Spatial Lookups

Availability: PostGIS, MariaDB, MySQL, SpatiaLite, PGRaster (Native) Tests if the geometry or raster field’s bounding box completely contains the lookup geometry’s bounding box.

4.2 5.0 5.1 5.2 6.0

bboverlaps

Reference GIS QuerySet API Reference Spatial Lookups

Availability: PostGIS, MariaDB, MySQL, SpatiaLite, PGRaster (Native) Tests if the geometry field’s bounding box overlaps the lookup geometry’s bounding box.

4.2 5.0 5.1 5.2 6.0

contained

Reference GIS QuerySet API Reference Spatial Lookups

Availability: PostGIS, MariaDB, MySQL, SpatiaLite, PGRaster (Native) Tests if the geometry field’s bounding box is completely contained by the lookup geometry’s bounding box.

4.2 5.0 5.1 5.2 6.0

contains

Reference GIS QuerySet API Reference Spatial Lookups

Availability: PostGIS, Oracle, MariaDB, MySQL, SpatiaLite, PGRaster (Bilateral) Tests if the geometry field spatially contains the lookup geometry.

4.2 5.0 5.1 5.2 6.0