---
title: "API Bunachar Sonraí GeodJango"
version: 6.0
locale: ga
source: https://docs.djangoproject.com/ga/6.0/ref/contrib/gis/db-api/
canonical: https://djangodocs.dev/ga/6.0/ref/contrib/gis/db-api/
---
# API Bunachar Sonraí GeodJango

## Cúltaca Spásúla

Soláthraíonn GeodJango na cúltaca bunachar sonraí spásúla seo a leanas faoi láthair:

- `django.contrib.gis.db.backends.postgis`
- `django.contrib.gis.db.backends.mysql`
- `django.contrib.gis.db.backends.oracle`
- `django.contrib.gis.db.backends.spatialite`

### Teorainneacha Spásúla

Tacaíonn Django le feidhmeanna spásúla a oibríonn ar gheoiméadraí fíor atá ar fáil i leaganacha MySQL Mar sin féin, níl na feidhmeanna spásúla chomh saibhir le cúltaca eile cosúil le PostGIS.

### Tacaíocht Raster

Ní chuirtear Rasterfield i bhfeidhm faoi láthair ach amháin don chúltaca PostGIS. Tá cuardaigh spásúla ar fáil do réimsí raster, ach ní chuirtear feidhmeanna bunachar sonraí spásúla agus comhiomlánaithe i bhfeidhm do réimsí raster.

## Múnlaí a Chruthú agus a Sábháil le Réimsí

Seo sampla de conas réad geoiméadrach a chruthú (ag glacadh leis an tsamhail Zipcode ):

```pycon
>>> from zipcode.models import Zipcode
>>> z = Zipcode(code=77096, poly="POLYGON(( 10 10, 10 20, 20 20, 20 15, 10 10))")
>>> z.save()
```

[`GEOSGeometry`](/ga/6.0/ref/contrib/gis/geos/#django.contrib.gis.geos.GEOSGeometry) objects may also be used to save
geometric models:

```pycon
>>> from django.contrib.gis.geos import GEOSGeometry
>>> poly = GEOSGeometry("POLYGON(( 10 10, 10 20, 20 20, 20 15, 10 10))")
>>> z = Zipcode(code=77096, poly=poly)
>>> z.save()
```

Thairis sin, má tá an “Geosgeoiméadracht” i gcóras comhordaithe difriúil (tá luach SRID difriúil aige) ná luach an réimse, ansin déanfar é a chlaochlú go hinmheánach go SRID réimse an tsamhail, ag baint úsáide as nós imeachta claochlaithe an bhunachar sonraí spásúil:

```pycon
>>> poly_3084 = GEOSGeometry(
...     "POLYGON(( 10 10, 10 20, 20 20, 20 15, 10 10))", srid=3084
... )  # SRID 3084 is 'NAD83(HARN) / Texas Centric Lambert Conformal'
>>> z = Zipcode(code=78212, poly=poly_3084)
>>> z.save()
>>> from django.db import connection
>>> print(
...     connection.queries[-1]["sql"]
... )  # printing the last SQL statement executed (requires DEBUG=True)
INSERT INTO "geoapp_zipcode" ("code", "poly") VALUES (78212, ST_Transform(ST_GeomFromWKB('\\001 ... ', 3084), 4326))
```

Dá bhrí sin, féadfar paraiméadair geoiméadachta a rith agus an réad Geosgeoimetry', WKT (Téacs aitheanta \[#fnwkt\] \_), HEXEWKB (sonrach PostGIS - geoiméadacht WKB i heicseachadúil \[#fnewkb\] \_), agus GeoJSON (féach: rfc: \`7946). Go bunúsach, mura rud “Geosgeoiméadracht” é an t-ionchur, déanfaidh an réimse geoiméadrach iarracht sampla Geosgeoimetry' a chruthú ón ionchur.

\<geos-tutorial\>Le haghaidh tuilleadh faisnéise ag cruthúithe:class: ~django.contrib.gis.geos.geosgeometry rudaí, féach fao:ref: TEAGAISC GEOS .

## Samhlacha a Chruthú agus a Sábháil le Réimsí Raster

Agus samhlacha raster á gcruthú agat, tionóidh an réimse raster an t-ionchur go hiontach go a:class: ~django.contrib.gis.gdal.gdalraster ag baint úsáide as meastóireacht lazy-. Dá bhrí sin glacfaidh an réimse raster le haon ionchur a ghlacann an tógálaí: class: ~django.contrib.gis.gdal.gdalraster.

Seo sampla de conas réad raster a chruthú ó chomhad raster `volcán.tif` (ag glacadh leis an tsamhail `Airde`):

```pycon
>>> from elevation.models import Elevation
>>> dem = Elevation(name="Volcano", rast="/path/to/raster/volcano.tif")
>>> dem.save()
```

[`GDALRaster`](/ga/6.0/ref/contrib/gis/gdal/#django.contrib.gis.gdal.GDALRaster) objects may also be used to save
raster models:

```pycon
>>> from django.contrib.gis.gdal import GDALRaster
>>> rast = GDALRaster(
...     {
...         "width": 10,
...         "height": 10,
...         "name": "Canyon",
...         "srid": 4326,
...         "scale": [0.1, -0.1],
...         "bands": [{"data": range(100)}],
...     }
... )
>>> dem = Elevation(name="Canyon", rast=rast)
>>> dem.save()
```

Note that this is equivalent to:

```pycon
>>> dem = Elevation.objects.create(
...     name="Canyon",
...     rast={
...         "width": 10,
...         "height": 10,
...         "name": "Canyon",
...         "srid": 4326,
...         "scale": [0.1, -0.1],
...         "bands": [{"data": range(100)}],
...     },
... )
```

## Cuardaigh Spásúla

GeoDjango's lookup types may be used with any manager method like
`filter()`, `exclude()`, etc. However, the lookup types unique to
GeoDjango are only available on spatial fields.

Filters on 'normal' fields (e.g. [`CharField`](/ga/6.0/ref/models/fields/#django.db.models.CharField))
may be chained with those on geographic fields. Geographic lookups accept
geometry and raster input on both sides, and input types can be mixed freely in
most cases. However, unlike assignments to model fields, with lookups,
types such as `str`, [`pathlib.Path`](https://docs.python.org/3/library/pathlib.html#pathlib.Path), and `dict` must be wrapped by
[`GDALRaster`](/ga/6.0/ref/contrib/gis/gdal/#django.contrib.gis.gdal.GDALRaster) to signify that the potential for
file writing or network fetching is acceptable. For the rationale, see
[raster security considerations](/ga/6.0/ref/contrib/gis/gdal/#raster-security).

Déantar cur síos thíos ar struchtúr ginearálta na gcuardach geografacha. \<spatial-lookups\>Is féidir tagairt iomlán a fháil in:ref: tagairt cuardaigh spásúil .

> **Changed in Django 5.2.17**
>
> In earlier versions, spatial lookups accepted `str` and `dict` types
> for new rasters, allowing file writes and network fetches.

### Cuardaigh Geoiméadra

Geographic queries with geometries take the following general form (assuming
the `Zipcode` model used in the [API Múnla GeodJango](/ga/6.0/ref/contrib/gis/model-api/)):

```text
>>> qs = Zipcode.objects.filter(<field>__<lookup_type>=<parameter>)
>>> qs = Zipcode.objects.exclude(...)
```

Mar shampla:

```pycon
>>> qs = Zipcode.objects.filter(poly__contains=pnt)
>>> qs = Elevation.objects.filter(poly__contains=rst)
```

Sa chás seo, is é `poly` an réimse geografach, :lookup: contents \`is é an \<gis-contains\>cineál cuardaigh spásúil, \`pnt\` an paraiméadar (a d'fhéadfadh a bheith a:class: ~django.contrib.gis.geos.geosgeometry réad nó sreang GeoJSON, WKT, nó HEXEWKB), agus is é: rst\`: Rud django.contrib.gis.gdal.gdalraster\`.

### Cuardaigh Raster

Tá an comhréir cuardaigh raster cosúil leis an gcomhréir le haghaidh geoiméadraí. Is é an t-aon difríocht ná gur féidir innéacs banna a shonrú mar ionchur breise. Mura sonraítear aon innéacs banda, úsáidtear an chéad bhanda de réir réamhshocraithe (innéacs `0`). Sa chás sin tá an comhréir comhionann leis an gcomhréir le haghaidh cuardaigh geoiméadachta.

Chun an t-innéacs banna a shonrú, is féidir paraiméadar breise a shonrú ar an dá thaobh den chuardach. Ar an taobh clé, úsáidtear an comhréir béim dúbailte chun innéacs banna a rith. Ar an taobh na láimhe deise, is féidir tuple den innéacs raster agus banda a shonrú.

This results in the following general form for lookups involving rasters
(assuming the `Elevation` model used in the
[API Múnla GeodJango](/ga/6.0/ref/contrib/gis/model-api/)):

```text
>>> qs = Elevation.objects.filter(<field>__<lookup_type>=<parameter>)
>>> qs = Elevation.objects.filter(<field>__<band_index>__<lookup_type>=<parameter>)
>>> qs = Elevation.objects.filter(<field>__<lookup_type>=(<raster_input, <band_index>)
```

Mar shampla:

```pycon
>>> qs = Elevation.objects.filter(rast__contains=geom)
>>> qs = Elevation.objects.filter(rast__contains=rst)
>>> qs = Elevation.objects.filter(rast__1__contains=geom)
>>> qs = Elevation.objects.filter(rast__contains=(rst, 1))
>>> qs = Elevation.objects.filter(rast__1__contains=(rst, 1))
```

\<gis-contains\>Ar thaobh na láimhe clé den sampla, is é rast\` an réimse raster geografach agus is é: lookup: ```an cineál cuardaigh spásúil. Ar an taobh na láimhe deise, is ionchur geoiméadrach é ``geom``` agus `rst` is é a:class: ~django.contrib.gis.gdal.gdalraster réad. Tá an t-innéacs banna réamhshocraithe go `0` sa chéad dá cheist agus tá sé socraithe go `1` ar na cinn eile.

Cé gur féidir gach cuardach spásúil a úsáid le rudaí raster ar an dá thaobh, ní ghlacann gach oibreoir bunúsach le hionchur raster go dúchasach. Maidir le cásanna ina bhfuil an t-oibreoir ag súil le hionchur geoiméadais, déantar an raster a thiontú go géiméadracht Tá sé tábhachtach é seo a choinneáil i gcuimhne agus na torthaí cuardaigh á léirmhíniú.

\<spatial-lookup-compatibility\>Tá an cineál tacaíochta raster liostaithe do gach cuardach san: ref: tábla comhoiriúnacht . Níl cuardaigh a bhaineann le rasters ar fáil faoi láthair ach le haghaidh cúltaca PostGIS.

## Fiosrúcháin Fad

### Réamhrá

Distance calculations with spatial data is tricky because, unfortunately, the
Earth is not flat. Some distance queries with fields in a geographic coordinate
system may have to be expressed differently because of limitations in PostGIS.
Please see the [SRID a roghnú](/ga/6.0/ref/contrib/gis/model-api/#selecting-an-srid) section for more details.

### Cuardaigh Fad

*Availability*: PostGIS, MariaDB, MySQL, Oracle, SpatiaLite, PGRaster (Native)

Tá na cuardaigh achair seo a leanas ar fáil:

- [`distance_lt`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-distance_lt)
- [`distance_lte`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-distance_lte)
- [`distance_gt`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-distance_gt)
- [`distance_gte`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-distance_gte)
- [`dwithin`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-dwithin) (except MariaDB and MySQL)

> **Note**
>
> Chun\*thomhas\*, seachas fiosrú a dhéanamh ar achair, bain úsáid as an bhfeidhm:class: ~django.contrib.gis.db.models.functions.distance.

Glacann cuardaigh achair paraiméadar tuple lena n-áirítear:

1. Coiméadracht nó raster chun ríomhanna a bhunú ó; agus
2. Uimhir nó: aicme: ~django.contrib.gis.Measure.distance réad ina bhfuil an fad.

Má úsáidtear réad a:class: ~django.contrib.gis.Measure.distance, féadfar é a chur in iúl in aon aonaid (úsáidfidh an SQL a ghintear aonaid athraithe go cinn sa réimse); ar shlí eile, glactar leis go bhfuil paraiméadair uimhriúla in aonaid an réimse.

> **Note**
>
> In PostGIS, `ST_Distance_Sphere` does *not* limit the geometry types
> geographic distance queries are performed with. [^3]
> However, these queries may take a long time, as great-circle distances must
> be calculated on the fly for *every* row in the query. This is because the
> spatial index on traditional geometry fields cannot be used.
>
> Le haghaidh feidhmíochta i bhfad níos fearr ar cheisteanna achair WGS84, smaoinigh ar úsáid: ref: colúin tíreolaíochta \<geography-type\>\`i do bhunachar sonraí ina ionad toisc go bhfuil siad in ann a n-innéacs spásúil a úsáid i gceisteanna achair. Is féidir leat a rá le GeoDjango colún tíreolaíochta a úsáid trí \`Geography=True\` a shocrú i do shainmhíniú réimse.

\<tests/gis\_tests/distapp/models.py\>Mar shampla, abair go bhfuil samhail `SouthtexasCity` againn (ó:fhoinse: Tástálacha achair GeodJango ) ar chóras comhordaithe\* tionscadáilte\* atá bailí do chathracha i ndeisceart Texas:

```
from django.contrib.gis.db import models

class SouthTexasCity(models.Model):
    name = models.CharField(max_length=30)
    # A projected coordinate system (only valid for South Texas!)
    # is used, units are in meters.
    point = models.PointField(srid=32140)
```

Ansin is féidir ceisteanna achair a dhéanamh mar seo a leanas:

```pycon
>>> from django.contrib.gis.geos import GEOSGeometry
>>> from django.contrib.gis.measure import D  # ``D`` is a shortcut for ``Distance``
>>> from geoapp.models import SouthTexasCity
# Distances will be calculated from this point, which does not have to be projected.
>>> pnt = GEOSGeometry("POINT(-96.876369 29.905320)", srid=4326)
# If numeric parameter, units of field (meters in this case) are assumed.
>>> qs = SouthTexasCity.objects.filter(point__distance_lte=(pnt, 7000))
# Find all Cities within 7 km, > 20 miles away, and > 100 chains away (an obscure unit)
>>> qs = SouthTexasCity.objects.filter(point__distance_lte=(pnt, D(km=7)))
>>> qs = SouthTexasCity.objects.filter(point__distance_gte=(pnt, D(mi=20)))
>>> qs = SouthTexasCity.objects.filter(point__distance_gte=(pnt, D(chain=100)))
```

Oibríonn ceisteanna raster ar an mbealach céanna trí réimse raster a chur in ionad an réimse geoiméadrach ``point', nó an rud `pnt`` le réad raster, nó an dá rud. Chun innéacs banna ionchur raster a shonrú ar an taobh na láimhe deise, is féidir 3-tuple a chur chuig an lorg mar seo a leanas:

```pycon
>>> qs = SouthTexasCity.objects.filter(point__distance_gte=(rst, 2, D(km=7)))
```

I gcás ina n-úsáidfí an banda le hinnéacs 2 (an tríú banda) den raster `rst` chun an cuardach.

## Táblaí Comhoiriún

### Cuardaigh Spásúla

Soláthraíonn an tábla seo a leanas achoimre ar na cuardaigh spásúla atá ar fáil do gach cúltaca bunachar sonraí spásúil. Tá na cuardaigh PostGIS Raster (PGraster) roinnte sna trí chatagóir a thuairiscítear in:ref: sonraí cuardaigh raster \`: tacaíocht dúchasach \`\`\<spatial-lookup-raster\>N\`, tacaíocht dúchasach déthaobhach `B`, agus tacaíocht tiontaithe geoiméadais `C`.

| Cineál Cuardaigh | PostGIS | Oracle | MariaDB | MySQL \[#\] \_ | Spatialite | PGraster |
| --- | --- | --- | --- | --- | --- | --- |
| [`bbcontains`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-bbcontains) | X |  | X | X | X | N |
| [`bboverlaps`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-bboverlaps) | X |  | X | X | X | N |
| [`contained`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-contained) | X |  | X | X | X | N |
| \<gis-contains\>:lookup: tá \` | X | X | X | X | X | B |
| [`contains_properly`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-contains_properly) | X |  |  |  |  | B |
| [`coveredby`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-coveredby) | X | X | X (≥ 12.0.1) | X | X | B |
| [`covers`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-covers) | X | X |  | X | X | B |
| [`crosses`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-crosses) | X |  | X | X | X | C |
| [`disjoint`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-disjoint) | X | X | X | X | X | B |
| [`distance_gt`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-distance_gt) | X | X | X | X | X | N |
| [`distance_gte`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-distance_gte) | X | X | X | X | X | N |
| [`distance_lt`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-distance_lt) | X | X | X | X | X | N |
| [`distance_lte`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-distance_lte) | X | X | X | X | X | N |
| [`dwithin`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-dwithin) | X | X |  |  | X | B |
| [`equals`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-equals) | X | X | X | X | X | C |
| \<same\_as\>:lookup: cruinn \` | X | X | X | X | X | B |
| [`geom_type`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-geom_type) | X | X (≥ 23c) | X | X | X |  |
| [`intersects`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-intersects) | X | X | X | X | X | B |
| [`isempty`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-isempty) | X |  |  |  |  |  |
| [`isvalid`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-isvalid) | X | X | X (≥ 12.0.1) | X | X |  |
| [`overlaps`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-overlaps) | X | X | X | X | X | B |
| [`relate`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-relate) | X | X | X |  | X | C |
| [`same_as`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-same_as) | X | X | X | X | X | B |
| [`touches`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-touches) | X | X | X | X | X | B |
| [`within`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-within) | X | X | X | X | X | B |
| [`left`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-left) | X |  |  |  |  | C |
| [`right`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-right) | X |  |  |  |  | C |
| [`overlaps_left`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-overlaps_left) | X |  |  |  |  | B |
| [`overlaps_right`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-overlaps_right) | X |  |  |  |  | B |
| [`overlaps_above`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-overlaps_above) | X |  |  |  |  | C |
| [`overlaps_below`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-overlaps_below) | X |  |  |  |  | C |
| [`strictly_above`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-strictly_above) | X |  |  |  |  | C |
| [`strictly_below`](/ga/6.0/ref/contrib/gis/geoquerysets/#std-fieldlookup-strictly_below) | X |  |  |  |  | C |

### feidhmeanna bunachar sonraí

Soláthraíonn an tábla seo a leanas achoimre ar na feidhmeanna bunachar sonraí tíreolaíochta atá ar fáil ar gach cúltaca spásúil.

| Feidhm | PostGIS | Oracle | MariaDB | MySQL | Spatialite |
| --- | --- | --- | --- | --- | --- |
| [`Area`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Area) | X | X | X | X | X |
| [`AsGeoJSON`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.AsGeoJSON) | X | X | X | X | X |
| [`AsGML`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.AsGML) | X | X |  |  | X |
| [`AsKML`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.AsKML) | X |  |  |  | X |
| [`AsSVG`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.AsSVG) | X |  |  |  | X |
| [`AsWKB`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.AsWKB) | X | X | X | X | X |
| [`AsWKT`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.AsWKT) | X | X | X | X | X |
| [`Azimuth`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Azimuth) | X |  |  |  | X (LWGEOM/RTTOPO) |
| [`BoundingCircle`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.BoundingCircle) | X | X |  |  | X (≥ 5.1) |
| [`Centroid`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Centroid) | X | X | X | X | X |
| [`ClosestPoint`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.ClosestPoint) | X |  |  |  | X |
| [`Difference`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Difference) | X | X | X | X | X |
| [`Distance`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Distance) | X | X | X | X | X |
| [`Envelope`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Envelope) | X | X | X | X | X |
| [`ForcePolygonCW`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.ForcePolygonCW) | X |  |  |  | X |
| [`FromWKB`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.FromWKB) | X | X | X | X | X |
| [`FromWKT`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.FromWKT) | X | X | X | X | X |
| [`GeoHash`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.GeoHash) | X |  | X (≥ 12.0.1) | X | X (LWGEOM/RTTOPO) |
| [`GeometryDistance`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.GeometryDistance) | X |  |  |  |  |
| [`GeometryType`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.GeometryType) | X | X (≥ 23c) | X | X | X |
| [`Intersection`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Intersection) | X | X | X | X | X |
| [`IsEmpty`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.IsEmpty) | X |  |  |  |  |
| [`IsValid`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.IsValid) | X | X | X (≥ 12.0.1) | X | X |
| [`Length`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Length) | X | X | X | X | X |
| [`LineLocatePoint`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.LineLocatePoint) | X |  |  |  | X |
| [`MakeValid`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.MakeValid) | X |  |  |  | X (LWGEOM/RTTOPO) |
| [`MemSize`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.MemSize) | X |  |  |  |  |
| [`NumGeometries`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.NumGeometries) | X | X | X | X | X |
| [`NumPoints`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.NumPoints) | X | X | X | X | X |
| [`Perimeter`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Perimeter) | X | X |  |  | X |
| [`PointOnSurface`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.PointOnSurface) | X | X | X |  | X |
| [`Reverse`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Reverse) | X | X |  |  | X |
| [`Rotate`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Rotate) | X |  |  |  |  |
| [`Scale`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Scale) | X |  |  |  | X |
| [`SnapToGrid`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.SnapToGrid) | X |  |  |  | X |
| [`SymDifference`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.SymDifference) | X | X | X | X | X |
| [`Transform`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Transform) | X | X |  |  | X |
| [`Translate`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Translate) | X |  |  |  | X |
| [`Union`](/ga/6.0/ref/contrib/gis/functions/#django.contrib.gis.db.models.functions.Union) | X | X | X | X | X |

### Feidhmeanna Chom

The following table provides a summary of what GIS-specific aggregate functions
are available on each spatial backend.

| comhiomlán | PostGIS | Oracle | MariaDB | MySQL | Spatialite |
| --- | --- | --- | --- | --- | --- |
| [`Collect`](/ga/6.0/ref/contrib/gis/geoquerysets/#django.contrib.gis.db.models.Collect) | X |  | X (≥ 12.0.1) | X (≥ 8.0.24) | X |
| [`Extent`](/ga/6.0/ref/contrib/gis/geoquerysets/#django.contrib.gis.db.models.Extent) | X | X |  |  | X |
| [`Extent3D`](/ga/6.0/ref/contrib/gis/geoquerysets/#django.contrib.gis.db.models.Extent3D) | X |  |  |  |  |
| [`MakeLine`](/ga/6.0/ref/contrib/gis/geoquerysets/#django.contrib.gis.db.models.MakeLine) | X |  |  |  | X |
| [`Union`](/ga/6.0/ref/contrib/gis/geoquerysets/#django.contrib.gis.db.models.Union) | X | X |  |  | X |

**Fonótaí**

[^1]: *\< https://portal.ogc.org/files/?artifact\_id=829\> Féach* Open Geospatial Consortium, Inc., , Doiciméad 99-049 (5 Bealtaine, 1999), ag Ch. 3.2.5, lch. 3-11 (Léiriú Téacsúil SQL ar Geoiméadra).

[^2]: \< [https://postgis.net/docs/using\_postgis\_dbmanagement.html#EWKB\_EWKT](https://postgis.net/docs/using_postgis_dbmanagement.html#EWKB_EWKT)\>\*Féach\* , doiciméadú PostGIS ag Ch. 4.1.2.

[^3]: \< [https://postgis.net/docs/ST\_DistanceSphere.html](https://postgis.net/docs/ST_DistanceSphere.html)\>\*Féach\* Doiciméadú PostGIS \`\_ ar \`\`ST\_distancesphere\`.

[^4]: Tagair:ref: roinn mysql-spatial-limitations le haghaidh tuilleadh sonraí.
