Skip to content

Commit

Permalink
Linked GIS functions docs to corresponding MySQL docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
sir-sigurd committed Dec 28, 2017
1 parent aefe624 commit 47aba5e
Showing 1 changed file with 44 additions and 28 deletions.
72 changes: 44 additions & 28 deletions docs/ref/contrib/gis/functions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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`
Expand Down Expand Up @@ -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``
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.

0 comments on commit 47aba5e

Please sign in to comment.