mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Refs #36485 -- Rewrapped docs to 79 columns line length.
Lines in the docs files were manually adjusted to conform to the 79 columns limit per line (plus newline), improving readability and consistency across the content.
This commit is contained in:
@@ -29,7 +29,7 @@ Measurements
|
||||
.. class:: Area(expression, **extra)
|
||||
|
||||
*Availability*: MariaDB, `MySQL
|
||||
<https://dev.mysql.com/doc/refman/en/gis-polygon-property-functions.html#function_st-area>`_,
|
||||
<https://dev.mysql.com/doc/refman/en/gis-polygon-property-functions.html#function_st-area>`__,
|
||||
Oracle, `PostGIS <https://postgis.net/docs/ST_Area.html>`__, SpatiaLite
|
||||
|
||||
Accepts a single geographic field or expression and returns the area of the
|
||||
@@ -48,8 +48,8 @@ geographic SRSes.
|
||||
`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
|
||||
float value is returned when the coordinates are geodetic.
|
||||
them, as a :class:`~django.contrib.gis.measure.Distance` object. On MySQL, a
|
||||
raw float value is returned when the coordinates are geodetic.
|
||||
|
||||
On backends that support distance calculation on geodetic coordinates, the
|
||||
proper backend function is automatically chosen depending on the SRID value of
|
||||
@@ -81,18 +81,19 @@ queryset is calculated:
|
||||
.. note::
|
||||
|
||||
Because the ``distance`` attribute is a
|
||||
:class:`~django.contrib.gis.measure.Distance` object, you can easily express
|
||||
the value in the units of your choice. For example, ``city.distance.mi`` is
|
||||
the distance value in miles and ``city.distance.km`` is the distance value
|
||||
in kilometers. See :doc:`measure` for usage details and the list of
|
||||
:ref:`supported_units`.
|
||||
:class:`~django.contrib.gis.measure.Distance` object, you can easily
|
||||
express the value in the units of your choice. For example,
|
||||
``city.distance.mi`` is the distance value in miles and
|
||||
``city.distance.km`` is the distance value in kilometers. See
|
||||
:doc:`measure` for usage details and the list of :ref:`supported_units`.
|
||||
|
||||
``GeometryDistance``
|
||||
--------------------
|
||||
|
||||
.. class:: GeometryDistance(expr1, expr2, **extra)
|
||||
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/geometry_distance_knn.html>`__
|
||||
*Availability*: `PostGIS
|
||||
<https://postgis.net/docs/geometry_distance_knn.html>`__
|
||||
|
||||
Accepts two geographic fields or expressions and returns the distance between
|
||||
them. When used in an :meth:`~django.db.models.query.QuerySet.order_by` clause,
|
||||
@@ -126,8 +127,8 @@ MySQL doesn't support length calculations on geographic SRSes.
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/ST_Perimeter.html>`__,
|
||||
Oracle, SpatiaLite
|
||||
|
||||
Accepts a single geographic field or expression and returns the perimeter of the
|
||||
geometry field as a :class:`~django.contrib.gis.measure.Distance` object.
|
||||
Accepts a single geographic field or expression and returns the perimeter of
|
||||
the geometry field as a :class:`~django.contrib.gis.measure.Distance` object.
|
||||
|
||||
Relationships
|
||||
=============
|
||||
@@ -150,8 +151,9 @@ south = ``π``; west = ``3π/2``.
|
||||
|
||||
.. class:: BoundingCircle(expression, num_seg=48, **extra)
|
||||
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/ST_MinimumBoundingCircle.html>`__,
|
||||
`Oracle <https://docs.oracle.com/en/database/oracle/oracle-database/21/spatl/
|
||||
*Availability*: `PostGIS
|
||||
<https://postgis.net/docs/ST_MinimumBoundingCircle.html>`__, `Oracle
|
||||
<https://docs.oracle.com/en/database/oracle/oracle-database/21/spatl/
|
||||
SDO_GEOM-reference.html#GUID-82A61626-BB64-4793-B53D-A0DBEC91831A>`_,
|
||||
SpatiaLite 5.1+
|
||||
|
||||
@@ -205,8 +207,8 @@ representing the bounding box of the geometry.
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/ST_LineLocatePoint.html>`__,
|
||||
SpatiaLite
|
||||
|
||||
Returns a float between 0 and 1 representing the location of the closest point on
|
||||
``linestring`` to the given ``point``, as a fraction of the 2D line length.
|
||||
Returns a float between 0 and 1 representing the location of the closest point
|
||||
on ``linestring`` to the given ``point``, as a fraction of the 2D line length.
|
||||
|
||||
``PointOnSurface``
|
||||
------------------
|
||||
@@ -216,8 +218,9 @@ Returns a float between 0 and 1 representing the location of the closest point o
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/ST_PointOnSurface.html>`__,
|
||||
MariaDB, Oracle, SpatiaLite
|
||||
|
||||
Accepts a single geographic field or expression and returns a ``Point`` geometry
|
||||
guaranteed to lie on the surface of the field; otherwise returns ``None``.
|
||||
Accepts a single geographic field or expression and returns a ``Point``
|
||||
geometry guaranteed to lie on the surface of the field; otherwise returns
|
||||
``None``.
|
||||
|
||||
Operations
|
||||
==========
|
||||
@@ -334,7 +337,8 @@ parameter.
|
||||
|
||||
.. class:: Scale(expression, x, y, z=0.0, **extra)
|
||||
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/ST_Scale.html>`__, SpatiaLite
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/ST_Scale.html>`__,
|
||||
SpatiaLite
|
||||
|
||||
Accepts a single geographic field or expression and returns a geometry with
|
||||
scaled coordinates by multiplying them with the ``x``, ``y``, and optionally
|
||||
@@ -469,8 +473,8 @@ Keyword Argument Description
|
||||
*Availability*: Oracle, `PostGIS <https://postgis.net/docs/ST_AsGML.html>`__,
|
||||
SpatiaLite
|
||||
|
||||
Accepts a single geographic field or expression and returns a `Geographic Markup
|
||||
Language (GML)`__ representation of the geometry.
|
||||
Accepts a single geographic field or expression and returns a `Geographic
|
||||
Markup Language (GML)`__ representation of the geometry.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -498,7 +502,8 @@ __ https://en.wikipedia.org/wiki/Geography_Markup_Language
|
||||
|
||||
.. class:: AsKML(expression, precision=8, **extra)
|
||||
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/ST_AsKML.html>`__, SpatiaLite
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/ST_AsKML.html>`__,
|
||||
SpatiaLite
|
||||
|
||||
Accepts a single geographic field or expression and returns a `Keyhole Markup
|
||||
Language (KML)`__ representation of the geometry.
|
||||
@@ -527,7 +532,8 @@ __ https://developers.google.com/kml/documentation/
|
||||
|
||||
.. class:: AsSVG(expression, relative=False, precision=8, **extra)
|
||||
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/ST_AsSVG.html>`__, SpatiaLite
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/ST_AsSVG.html>`__,
|
||||
SpatiaLite
|
||||
|
||||
Accepts a single geographic field or expression and returns a `Scalable Vector
|
||||
Graphics (SVG)`__ representation of the geometry.
|
||||
@@ -668,8 +674,8 @@ Accepts a single geographic field or expression and returns the memory size
|
||||
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``
|
||||
or ``MULTI*`` field). Returns 1 for single geometries.
|
||||
geometries if the geometry field is a collection (e.g., a
|
||||
``GEOMETRYCOLLECTION`` or ``MULTI*`` field). Returns 1 for single geometries.
|
||||
|
||||
On MySQL, returns ``None`` for single geometries.
|
||||
|
||||
@@ -682,7 +688,7 @@ On MySQL, returns ``None`` for single geometries.
|
||||
<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.
|
||||
Accepts a single geographic field or expression and returns the number of
|
||||
points in a geometry.
|
||||
|
||||
On MySQL, returns ``None`` for any non-``LINESTRING`` geometry.
|
||||
|
||||
Reference in New Issue
Block a user