mirror of
https://github.com/django/django.git
synced 2025-06-07 20:49:11 +00:00
Updated indentation in GEOS docs
This commit is contained in:
parent
10c53385f8
commit
6c9603277d
@ -326,8 +326,8 @@ that are a part of this geometry.
|
|||||||
|
|
||||||
.. attribute:: GEOSGeometry.json
|
.. attribute:: GEOSGeometry.json
|
||||||
|
|
||||||
Returns the GeoJSON representation of the geometry. Note that the result is not
|
Returns the GeoJSON representation of the geometry. Note that the result is
|
||||||
a complete GeoJSON structure but only the ``geometry`` key content of a
|
not a complete GeoJSON structure but only the ``geometry`` key content of a
|
||||||
GeoJSON structure. See also :doc:`/ref/contrib/gis/serializers`.
|
GeoJSON structure. See also :doc:`/ref/contrib/gis/serializers`.
|
||||||
|
|
||||||
.. attribute:: GEOSGeometry.geojson
|
.. attribute:: GEOSGeometry.geojson
|
||||||
@ -400,10 +400,10 @@ If either geometry is empty, returns ``False``.
|
|||||||
This predicate is similar to :meth:`GEOSGeometry.contains`, but is more
|
This predicate is similar to :meth:`GEOSGeometry.contains`, but is more
|
||||||
inclusive (i.e. returns ``True`` for more cases). In particular, unlike
|
inclusive (i.e. returns ``True`` for more cases). In particular, unlike
|
||||||
:meth:`~GEOSGeometry.contains` it does not distinguish between points in the
|
:meth:`~GEOSGeometry.contains` it does not distinguish between points in the
|
||||||
boundary and in the interior of geometries. For most situations, ``covers()``
|
boundary and in the interior of geometries. For most situations,
|
||||||
should be preferred to :meth:`~GEOSGeometry.contains`. As an added benefit,
|
``covers()`` should be preferred to :meth:`~GEOSGeometry.contains`. As an
|
||||||
``covers()`` is more amenable to optimization and hence should outperform
|
added benefit, ``covers()`` is more amenable to optimization and hence
|
||||||
:meth:`~GEOSGeometry.contains`.
|
should outperform :meth:`~GEOSGeometry.contains`.
|
||||||
|
|
||||||
.. method:: GEOSGeometry.crosses(other)
|
.. method:: GEOSGeometry.crosses(other)
|
||||||
|
|
||||||
@ -461,9 +461,9 @@ Topological Methods
|
|||||||
.. method:: GEOSGeometry.buffer(width, quadsegs=8)
|
.. method:: GEOSGeometry.buffer(width, quadsegs=8)
|
||||||
|
|
||||||
Returns a :class:`GEOSGeometry` that represents all points whose distance
|
Returns a :class:`GEOSGeometry` that represents all points whose distance
|
||||||
from this geometry is less than or equal to the given ``width``. The optional
|
from this geometry is less than or equal to the given ``width``. The
|
||||||
``quadsegs`` keyword sets the number of segments used to approximate a
|
optional ``quadsegs`` keyword sets the number of segments used to
|
||||||
quarter circle (defaults is 8).
|
approximate a quarter circle (defaults is 8).
|
||||||
|
|
||||||
.. method:: GEOSGeometry.difference(other)
|
.. method:: GEOSGeometry.difference(other)
|
||||||
|
|
||||||
@ -475,8 +475,8 @@ geometry that do not make up other.
|
|||||||
|
|
||||||
Given a distance (float), returns the point (or closest point) within the
|
Given a distance (float), returns the point (or closest point) within the
|
||||||
geometry (:class:`LineString` or :class:`MultiLineString`) at that distance.
|
geometry (:class:`LineString` or :class:`MultiLineString`) at that distance.
|
||||||
The normalized version takes the distance as a float between 0 (origin) and 1
|
The normalized version takes the distance as a float between 0 (origin) and
|
||||||
(endpoint).
|
1 (endpoint).
|
||||||
|
|
||||||
Reverse of :meth:`GEOSGeometry.project`.
|
Reverse of :meth:`GEOSGeometry.project`.
|
||||||
|
|
||||||
@ -489,10 +489,10 @@ geometry and other.
|
|||||||
.. method:: GEOSGeometry.project_normalized(point)
|
.. method:: GEOSGeometry.project_normalized(point)
|
||||||
|
|
||||||
Returns the distance (float) from the origin of the geometry
|
Returns the distance (float) from the origin of the geometry
|
||||||
(:class:`LineString` or :class:`MultiLineString`) to the point projected on the
|
(:class:`LineString` or :class:`MultiLineString`) to the point projected on
|
||||||
geometry (that is to a point of the line the closest to the given point).
|
the geometry (that is to a point of the line the closest to the given
|
||||||
The normalized version returns the distance as a float between 0 (origin) and 1
|
point). The normalized version returns the distance as a float between 0
|
||||||
(endpoint).
|
(origin) and 1 (endpoint).
|
||||||
|
|
||||||
Reverse of :meth:`GEOSGeometry.interpolate`.
|
Reverse of :meth:`GEOSGeometry.interpolate`.
|
||||||
|
|
||||||
@ -508,10 +508,10 @@ using the Douglas-Peucker algorithm. A higher tolerance value implies
|
|||||||
fewer points in the output. If no tolerance is provided, it defaults to 0.
|
fewer points in the output. If no tolerance is provided, it defaults to 0.
|
||||||
|
|
||||||
By default, this function does not preserve topology. For example,
|
By default, this function does not preserve topology. For example,
|
||||||
:class:`Polygon` objects can be split, be collapsed into lines, or disappear.
|
:class:`Polygon` objects can be split, be collapsed into lines, or
|
||||||
:class:`Polygon` holes can be created or disappear, and lines may cross.
|
disappear. :class:`Polygon` holes can be created or disappear, and lines may
|
||||||
By specifying ``preserve_topology=True``, the result will have the same
|
cross. By specifying ``preserve_topology=True``, the result will have the
|
||||||
dimension and number of components as the input; this is significantly
|
same dimension and number of components as the input; this is significantly
|
||||||
slower, however.
|
slower, however.
|
||||||
|
|
||||||
.. method:: GEOSGeometry.sym_difference(other)
|
.. method:: GEOSGeometry.sym_difference(other)
|
||||||
@ -564,9 +564,10 @@ The result obeys the following contract:
|
|||||||
* Unioning a set of :class:`LineString`\s has the effect of fully noding and
|
* Unioning a set of :class:`LineString`\s has the effect of fully noding and
|
||||||
dissolving the linework.
|
dissolving the linework.
|
||||||
|
|
||||||
* Unioning a set of :class:`Polygon`\s will always return a :class:`Polygon` or
|
* Unioning a set of :class:`Polygon`\s will always return a :class:`Polygon`
|
||||||
:class:`MultiPolygon` geometry (unlike :meth:`GEOSGeometry.union`, which may
|
or :class:`MultiPolygon` geometry (unlike :meth:`GEOSGeometry.union`,
|
||||||
return geometries of lower dimension if a topology collapse occurs).
|
which may return geometries of lower dimension if a topology collapse
|
||||||
|
occurs).
|
||||||
|
|
||||||
Other Properties & Methods
|
Other Properties & Methods
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -586,8 +587,8 @@ This method returns a :class:`GEOSGeometry` that is a clone of the original.
|
|||||||
|
|
||||||
.. method:: GEOSGeometry.distance(geom)
|
.. method:: GEOSGeometry.distance(geom)
|
||||||
|
|
||||||
Returns the distance between the closest points on this geometry and the given
|
Returns the distance between the closest points on this geometry and the
|
||||||
``geom`` (another :class:`GEOSGeometry` object).
|
given ``geom`` (another :class:`GEOSGeometry` object).
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
@ -619,25 +620,26 @@ corresponding to the SRID of the geometry or ``None``.
|
|||||||
|
|
||||||
.. method:: GEOSGeometry.transform(ct, clone=False)
|
.. method:: GEOSGeometry.transform(ct, clone=False)
|
||||||
|
|
||||||
Transforms the geometry according to the given coordinate transformation parameter
|
Transforms the geometry according to the given coordinate transformation
|
||||||
(``ct``), which may be an integer SRID, spatial reference WKT string,
|
parameter (``ct``), which may be an integer SRID, spatial reference WKT
|
||||||
a PROJ.4 string, a :class:`~django.contrib.gis.gdal.SpatialReference` object, or a
|
string, a PROJ.4 string, a
|
||||||
:class:`~django.contrib.gis.gdal.CoordTransform` object. By default, the geometry
|
:class:`~django.contrib.gis.gdal.SpatialReference` object, or a
|
||||||
is transformed in-place and nothing is returned. However if the ``clone`` keyword
|
:class:`~django.contrib.gis.gdal.CoordTransform` object. By default, the
|
||||||
is set, then the geometry is not modified and a transformed clone of the geometry
|
geometry is transformed in-place and nothing is returned. However if the
|
||||||
is returned instead.
|
``clone`` keyword is set, then the geometry is not modified and a
|
||||||
|
transformed clone of the geometry is returned instead.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Requires GDAL. Raises :class:`~django.contrib.gis.geos.GEOSException` if
|
Requires GDAL. Raises :class:`~django.contrib.gis.geos.GEOSException` if
|
||||||
GDAL is not available or if the geometry's SRID is ``None`` or less than 0.
|
GDAL is not available or if the geometry's SRID is ``None`` or less than
|
||||||
It doesn't impose any constraints on the geometry's SRID if called with a
|
0. It doesn't impose any constraints on the geometry's SRID if called
|
||||||
:class:`~django.contrib.gis.gdal.CoordTransform` object.
|
with a :class:`~django.contrib.gis.gdal.CoordTransform` object.
|
||||||
|
|
||||||
.. versionchanged:: 1.10
|
.. versionchanged:: 1.10
|
||||||
|
|
||||||
In previous versions, it required the geometry's SRID to be a positive
|
In previous versions, it required the geometry's SRID to be a
|
||||||
integer even if it was called with a
|
positive integer even if it was called with a
|
||||||
:class:`~django.contrib.gis.gdal.CoordTransform` object.
|
:class:`~django.contrib.gis.gdal.CoordTransform` object.
|
||||||
|
|
||||||
``Point``
|
``Point``
|
||||||
@ -914,8 +916,8 @@ Example::
|
|||||||
:type srid: int
|
:type srid: int
|
||||||
:rtype: a :class:`GEOSGeometry` corresponding to the spatial data in the string
|
:rtype: a :class:`GEOSGeometry` corresponding to the spatial data in the string
|
||||||
|
|
||||||
``fromstr(string, srid)`` is equivalent to :class:`GEOSGeometry(string, srid)
|
``fromstr(string, srid)`` is equivalent to
|
||||||
<GEOSGeometry>`.
|
:class:`GEOSGeometry(string, srid) <GEOSGeometry>`.
|
||||||
|
|
||||||
Example::
|
Example::
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user