mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Linked GIS functions docs to corresponding MySQL docs.
This commit is contained in:
		| @@ -38,8 +38,9 @@ Measurement         Relationships              Operations              Editors | ||||
|  | ||||
| .. class:: Area(expression, **extra) | ||||
|  | ||||
| *Availability*: MySQL, Oracle, | ||||
| `PostGIS <https://postgis.net/docs/ST_Area.html>`__, SpatiaLite | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/gis-polygon-property-functions.html#function_area>`__, | ||||
| Oracle, `PostGIS <https://postgis.net/docs/ST_Area.html>`__, SpatiaLite | ||||
|  | ||||
| Accepts a single geographic field or expression and returns the area of the | ||||
| field as an :class:`~django.contrib.gis.measure.Area` measure. | ||||
| @@ -52,8 +53,9 @@ geographic SRSes. | ||||
|  | ||||
| .. class:: AsGeoJSON(expression, bbox=False, crs=False, precision=8, **extra) | ||||
|  | ||||
| *Availability*: MySQL (≥ 5.7.5), `PostGIS | ||||
| <https://postgis.net/docs/ST_AsGeoJSON.html>`__, SpatiaLite | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/spatial-geojson-functions.html#function_st-asgeojson>`__ (≥ 5.7.5), | ||||
| `PostGIS <https://postgis.net/docs/ST_AsGeoJSON.html>`__, SpatiaLite | ||||
|  | ||||
| Accepts a single geographic field or expression and returns a `GeoJSON | ||||
| <http://geojson.org/>`_ representation of the geometry. Note that the result is | ||||
| @@ -198,8 +200,9 @@ The ``num_seg`` parameter is used only on PostGIS. | ||||
|  | ||||
| .. class:: Centroid(expression, **extra) | ||||
|  | ||||
| *Availability*: MySQL, `PostGIS <https://postgis.net/docs/ST_Centroid.html>`__, | ||||
| Oracle, SpatiaLite | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/gis-polygon-property-functions.html#function_st-centroid>`__, | ||||
| `PostGIS <https://postgis.net/docs/ST_Centroid.html>`__, Oracle, SpatiaLite | ||||
|  | ||||
| Accepts a single geographic field or expression and returns the ``centroid`` | ||||
| value of the geometry. | ||||
| @@ -209,8 +212,9 @@ value of the geometry. | ||||
|  | ||||
| .. class:: Difference(expr1, expr2, **extra) | ||||
|  | ||||
| *Availability*: MySQL, `PostGIS | ||||
| <https://postgis.net/docs/ST_Difference.html>`__, Oracle, SpatiaLite | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/spatial-operator-functions.html#function_st-difference>`__, | ||||
| `PostGIS <https://postgis.net/docs/ST_Difference.html>`__, Oracle, SpatiaLite | ||||
|  | ||||
| Accepts two geographic fields or expressions and returns the geometric | ||||
| difference, that is the part of geometry A that does not intersect with | ||||
| @@ -221,8 +225,9 @@ geometry B. | ||||
|  | ||||
| .. class:: Distance(expr1, expr2, spheroid=None, **extra) | ||||
|  | ||||
| *Availability*: MySQL, `PostGIS <https://postgis.net/docs/ST_Distance.html>`__, | ||||
| Oracle, SpatiaLite | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/spatial-relation-functions-object-shapes.html#function_st-distance>`__, | ||||
| `PostGIS <https://postgis.net/docs/ST_Distance.html>`__, Oracle, SpatiaLite | ||||
|  | ||||
| Accepts two geographic fields or expressions and returns the distance between | ||||
| them, as a :class:`~django.contrib.gis.measure.Distance` object. On MySQL, a raw | ||||
| @@ -266,8 +271,9 @@ queryset is calculated:: | ||||
|  | ||||
| .. class:: Envelope(expression, **extra) | ||||
|  | ||||
| *Availability*: MySQL, `PostGIS <https://postgis.net/docs/ST_Envelope.html>`__, | ||||
| SpatiaLite | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/gis-general-property-functions.html#function_st-envelope>`__, | ||||
| `PostGIS <https://postgis.net/docs/ST_Envelope.html>`__, SpatiaLite | ||||
|  | ||||
| Accepts a single geographic field or expression and returns the geometry | ||||
| representing the bounding box of the geometry. | ||||
| @@ -306,8 +312,9 @@ right-hand rule. | ||||
|  | ||||
| .. class:: GeoHash(expression, precision=None, **extra) | ||||
|  | ||||
| *Availability*: MySQL (≥ 5.7.5), `PostGIS | ||||
| <https://postgis.net/docs/ST_GeoHash.html>`__, SpatiaLite (LWGEOM) | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/spatial-geohash-functions.html#function_st-geohash>`__ (≥ 5.7.5), | ||||
| `PostGIS <https://postgis.net/docs/ST_GeoHash.html>`__, SpatiaLite (LWGEOM) | ||||
|  | ||||
| Accepts a single geographic field or expression and returns a `GeoHash`__ | ||||
| representation of the geometry. | ||||
| @@ -326,8 +333,9 @@ __ https://en.wikipedia.org/wiki/Geohash | ||||
|  | ||||
| .. class:: Intersection(expr1, expr2, **extra) | ||||
|  | ||||
| *Availability*: MySQL, `PostGIS | ||||
| <https://postgis.net/docs/ST_Intersection.html>`__, Oracle, SpatiaLite | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/spatial-operator-functions.html#function_st-intersection>`__, | ||||
| `PostGIS <https://postgis.net/docs/ST_Intersection.html>`__, Oracle, SpatiaLite | ||||
|  | ||||
| Accepts two geographic fields or expressions and returns the geometric | ||||
| intersection between them. | ||||
| @@ -337,8 +345,9 @@ intersection between them. | ||||
|  | ||||
| .. class:: IsValid(expr) | ||||
|  | ||||
| *Availability*: MySQL (≥ 5.7.5), `PostGIS | ||||
| <https://postgis.net/docs/ST_IsValid.html>`__, Oracle, SpatiaLite (LWGEOM) | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/spatial-convenience-functions.html#function_st-isvalid>`__ (≥ 5.7.5), | ||||
| `PostGIS <https://postgis.net/docs/ST_IsValid.html>`__, Oracle, SpatiaLite (LWGEOM) | ||||
|  | ||||
| Accepts a geographic field or expression and tests if the value is well formed. | ||||
| Returns ``True`` if its value is a valid geometry and ``False`` otherwise. | ||||
| @@ -352,8 +361,9 @@ Returns ``True`` if its value is a valid geometry and ``False`` otherwise. | ||||
|  | ||||
| .. class:: Length(expression, spheroid=True, **extra) | ||||
|  | ||||
| *Availability*: MySQL, Oracle, `PostGIS | ||||
| <https://postgis.net/docs/ST_Length.html>`__, SpatiaLite | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/gis-linestring-property-functions.html#function_st-length>`__, | ||||
| Oracle, `PostGIS <https://postgis.net/docs/ST_Length.html>`__, SpatiaLite | ||||
|  | ||||
| Accepts a single geographic linestring or multilinestring field or expression | ||||
| and returns its length as a :class:`~django.contrib.gis.measure.Distance` | ||||
| @@ -407,8 +417,10 @@ Accepts a single geographic field or expression and returns the memory size | ||||
|  | ||||
| .. class:: NumGeometries(expression, **extra) | ||||
|  | ||||
| *Availability*: MySQL, `PostGIS | ||||
| <https://postgis.net/docs/ST_NumGeometries.html>`__, Oracle, SpatiaLite | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/gis-geometrycollection-property-functions.html#function_st-numgeometries>`__, | ||||
| `PostGIS <https://postgis.net/docs/ST_NumGeometries.html>`__, Oracle, | ||||
| SpatiaLite | ||||
|  | ||||
| Accepts a single geographic field or expression and returns the number of | ||||
| geometries if the geometry field is a collection (e.g., a ``GEOMETRYCOLLECTION`` | ||||
| @@ -421,8 +433,9 @@ On MySQL, returns ``None`` for single geometries. | ||||
|  | ||||
| .. class:: NumPoints(expression, **extra) | ||||
|  | ||||
| *Availability*: MySQL, `PostGIS <https://postgis.net/docs/ST_NPoints.html>`__, | ||||
| Oracle, SpatiaLite | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/gis-linestring-property-functions.html#function_st-numpoints>`__, | ||||
| `PostGIS <https://postgis.net/docs/ST_NPoints.html>`__, Oracle, SpatiaLite | ||||
|  | ||||
| Accepts a single geographic field or expression and returns the number of points | ||||
| in a geometry. | ||||
| @@ -499,8 +512,10 @@ Number of Arguments  Description | ||||
|  | ||||
| .. class:: SymDifference(expr1, expr2, **extra) | ||||
|  | ||||
| *Availability*: MySQL, `PostGIS | ||||
| <https://postgis.net/docs/ST_SymDifference.html>`__, Oracle, SpatiaLite | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/spatial-operator-functions.html#function_st-symdifference>`__, | ||||
| `PostGIS <https://postgis.net/docs/ST_SymDifference.html>`__, Oracle, | ||||
| SpatiaLite | ||||
|  | ||||
| Accepts two geographic fields or expressions and returns the geometric | ||||
| symmetric difference (union without the intersection) between the given | ||||
| @@ -541,8 +556,9 @@ parameters. | ||||
|  | ||||
| .. class:: Union(expr1, expr2, **extra) | ||||
|  | ||||
| *Availability*: MySQL, `PostGIS <https://postgis.net/docs/ST_Union.html>`__, | ||||
| Oracle, SpatiaLite | ||||
| *Availability*: `MySQL | ||||
| <https://dev.mysql.com/doc/refman/en/spatial-operator-functions.html#function_st-union>`__, | ||||
| `PostGIS <https://postgis.net/docs/ST_Union.html>`__, Oracle, SpatiaLite | ||||
|  | ||||
| Accepts two geographic fields or expressions and returns the union of both | ||||
| geometries. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user