Updated indentation in GEOS docs

This commit is contained in:
Claude Paroz 2016-04-16 19:49:10 +02:00
parent 10c53385f8
commit 6c9603277d
1 changed files with 371 additions and 369 deletions

View File

@ -326,8 +326,8 @@ that are a part of this geometry.
.. attribute:: GEOSGeometry.json
Returns the GeoJSON representation of the geometry. Note that the result is not
a complete GeoJSON structure but only the ``geometry`` key content of a
Returns the GeoJSON representation of the geometry. Note that the result is
not a complete GeoJSON structure but only the ``geometry`` key content of a
GeoJSON structure. See also :doc:`/ref/contrib/gis/serializers`.
.. 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
inclusive (i.e. returns ``True`` for more cases). In particular, unlike
:meth:`~GEOSGeometry.contains` it does not distinguish between points in the
boundary and in the interior of geometries. For most situations, ``covers()``
should be preferred to :meth:`~GEOSGeometry.contains`. As an added benefit,
``covers()`` is more amenable to optimization and hence should outperform
:meth:`~GEOSGeometry.contains`.
boundary and in the interior of geometries. For most situations,
``covers()`` should be preferred to :meth:`~GEOSGeometry.contains`. As an
added benefit, ``covers()`` is more amenable to optimization and hence
should outperform :meth:`~GEOSGeometry.contains`.
.. method:: GEOSGeometry.crosses(other)
@ -461,9 +461,9 @@ Topological Methods
.. method:: GEOSGeometry.buffer(width, quadsegs=8)
Returns a :class:`GEOSGeometry` that represents all points whose distance
from this geometry is less than or equal to the given ``width``. The optional
``quadsegs`` keyword sets the number of segments used to approximate a
quarter circle (defaults is 8).
from this geometry is less than or equal to the given ``width``. The
optional ``quadsegs`` keyword sets the number of segments used to
approximate a quarter circle (defaults is 8).
.. 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
geometry (:class:`LineString` or :class:`MultiLineString`) at that distance.
The normalized version takes the distance as a float between 0 (origin) and 1
(endpoint).
The normalized version takes the distance as a float between 0 (origin) and
1 (endpoint).
Reverse of :meth:`GEOSGeometry.project`.
@ -489,10 +489,10 @@ geometry and other.
.. method:: GEOSGeometry.project_normalized(point)
Returns the distance (float) from the origin of the geometry
(:class:`LineString` or :class:`MultiLineString`) to the point projected on the
geometry (that is to a point of the line the closest to the given point).
The normalized version returns the distance as a float between 0 (origin) and 1
(endpoint).
(:class:`LineString` or :class:`MultiLineString`) to the point projected on
the geometry (that is to a point of the line the closest to the given
point). The normalized version returns the distance as a float between 0
(origin) and 1 (endpoint).
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.
By default, this function does not preserve topology. For example,
:class:`Polygon` objects can be split, be collapsed into lines, or disappear.
:class:`Polygon` holes can be created or disappear, and lines may cross.
By specifying ``preserve_topology=True``, the result will have the same
dimension and number of components as the input; this is significantly
:class:`Polygon` objects can be split, be collapsed into lines, or
disappear. :class:`Polygon` holes can be created or disappear, and lines may
cross. By specifying ``preserve_topology=True``, the result will have the
same dimension and number of components as the input; this is significantly
slower, however.
.. 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
dissolving the linework.
* Unioning a set of :class:`Polygon`\s will always return a :class:`Polygon` or
:class:`MultiPolygon` geometry (unlike :meth:`GEOSGeometry.union`, which may
return geometries of lower dimension if a topology collapse occurs).
* Unioning a set of :class:`Polygon`\s will always return a :class:`Polygon`
or :class:`MultiPolygon` geometry (unlike :meth:`GEOSGeometry.union`,
which may return geometries of lower dimension if a topology collapse
occurs).
Other Properties & Methods
~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -586,8 +587,8 @@ This method returns a :class:`GEOSGeometry` that is a clone of the original.
.. method:: GEOSGeometry.distance(geom)
Returns the distance between the closest points on this geometry and the given
``geom`` (another :class:`GEOSGeometry` object).
Returns the distance between the closest points on this geometry and the
given ``geom`` (another :class:`GEOSGeometry` object).
.. note::
@ -619,25 +620,26 @@ corresponding to the SRID of the geometry or ``None``.
.. method:: GEOSGeometry.transform(ct, clone=False)
Transforms the geometry according to the given coordinate transformation parameter
(``ct``), which may be an integer SRID, spatial reference WKT string,
a PROJ.4 string, a :class:`~django.contrib.gis.gdal.SpatialReference` object, or a
:class:`~django.contrib.gis.gdal.CoordTransform` object. By default, the geometry
is transformed in-place and nothing is returned. However if the ``clone`` keyword
is set, then the geometry is not modified and a transformed clone of the geometry
is returned instead.
Transforms the geometry according to the given coordinate transformation
parameter (``ct``), which may be an integer SRID, spatial reference WKT
string, a PROJ.4 string, a
:class:`~django.contrib.gis.gdal.SpatialReference` object, or a
:class:`~django.contrib.gis.gdal.CoordTransform` object. By default, the
geometry is transformed in-place and nothing is returned. However if the
``clone`` keyword is set, then the geometry is not modified and a
transformed clone of the geometry is returned instead.
.. note::
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.
It doesn't impose any constraints on the geometry's SRID if called with a
:class:`~django.contrib.gis.gdal.CoordTransform` object.
GDAL is not available or if the geometry's SRID is ``None`` or less than
0. It doesn't impose any constraints on the geometry's SRID if called
with a :class:`~django.contrib.gis.gdal.CoordTransform` object.
.. versionchanged:: 1.10
In previous versions, it required the geometry's SRID to be a positive
integer even if it was called with a
In previous versions, it required the geometry's SRID to be a
positive integer even if it was called with a
:class:`~django.contrib.gis.gdal.CoordTransform` object.
``Point``
@ -914,8 +916,8 @@ Example::
:type srid: int
:rtype: a :class:`GEOSGeometry` corresponding to the spatial data in the string
``fromstr(string, srid)`` is equivalent to :class:`GEOSGeometry(string, srid)
<GEOSGeometry>`.
``fromstr(string, srid)`` is equivalent to
:class:`GEOSGeometry(string, srid) <GEOSGeometry>`.
Example::