|
@@ -379,10 +379,6 @@ another object.
|
|
|
|
|
|
Returns the Well-Known Text of the geometry (an OGC standard).
|
|
|
|
|
|
- .. versionchanged:: 1.10
|
|
|
-
|
|
|
- Non-significant zeros are stripped from the output.
|
|
|
-
|
|
|
__ https://developers.google.com/kml/documentation/
|
|
|
|
|
|
Spatial Predicate Methods
|
|
@@ -399,8 +395,6 @@ return a boolean.
|
|
|
|
|
|
.. method:: GEOSGeometry.covers(other)
|
|
|
|
|
|
- .. versionadded:: 1.10
|
|
|
-
|
|
|
Returns ``True`` if this geometry covers the specified geometry.
|
|
|
|
|
|
The ``covers`` predicate has the following equivalent definitions:
|
|
@@ -569,8 +563,6 @@ Topological Properties
|
|
|
|
|
|
.. attribute:: GEOSGeometry.unary_union
|
|
|
|
|
|
- .. versionadded:: 1.10
|
|
|
-
|
|
|
Computes the union of all the elements of this geometry.
|
|
|
|
|
|
The result obeys the following contract:
|
|
@@ -646,12 +638,6 @@ Other Properties & Methods
|
|
|
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
|
|
|
- :class:`~django.contrib.gis.gdal.CoordTransform` object.
|
|
|
-
|
|
|
.. method:: GEOSGeometry.normalize()
|
|
|
|
|
|
Converts this geometry to canonical form::
|
|
@@ -681,10 +667,6 @@ Other Properties & Methods
|
|
|
>>> pnt = Point()
|
|
|
>>> pnt = Point([])
|
|
|
|
|
|
- .. versionchanged:: 1.10
|
|
|
-
|
|
|
- In previous versions, an empty ``Point`` couldn't be instantiated.
|
|
|
-
|
|
|
``LineString``
|
|
|
--------------
|
|
|
|
|
@@ -709,14 +691,8 @@ Other Properties & Methods
|
|
|
>>> ls = LineString()
|
|
|
>>> ls = LineString([])
|
|
|
|
|
|
- .. versionchanged:: 1.10
|
|
|
-
|
|
|
- In previous versions, an empty ``LineString`` couldn't be instantiated.
|
|
|
-
|
|
|
.. attribute:: closed
|
|
|
|
|
|
- .. versionadded:: 1.10
|
|
|
-
|
|
|
Returns whether or not this ``LineString`` is closed.
|
|
|
|
|
|
``LinearRing``
|
|
@@ -749,10 +725,6 @@ Other Properties & Methods
|
|
|
>>> poly = Polygon(ext_coords, int_coords)
|
|
|
>>> poly = Polygon(LinearRing(ext_coords), LinearRing(int_coords))
|
|
|
|
|
|
- .. versionchanged:: 1.10
|
|
|
-
|
|
|
- In previous versions, an empty ``Polygon`` couldn't be instantiated.
|
|
|
-
|
|
|
.. classmethod:: from_bbox(bbox)
|
|
|
|
|
|
Returns a polygon object from the given bounding-box, a 4-tuple
|
|
@@ -787,10 +759,6 @@ Geometry Collections
|
|
|
>>> mp = MultiPoint(Point(0, 0), Point(1, 1))
|
|
|
>>> mp = MultiPoint( (Point(0, 0), Point(1, 1)) )
|
|
|
|
|
|
- .. versionchanged:: 1.10
|
|
|
-
|
|
|
- In previous versions, an empty ``MultiPoint`` couldn't be instantiated.
|
|
|
-
|
|
|
``MultiLineString``
|
|
|
-------------------
|
|
|
|
|
@@ -805,11 +773,6 @@ Geometry Collections
|
|
|
>>> mls = MultiLineString(ls1, ls2)
|
|
|
>>> mls = MultiLineString([ls1, ls2])
|
|
|
|
|
|
- .. versionchanged:: 1.10
|
|
|
-
|
|
|
- In previous versions, an empty ``MultiLineString`` couldn't be
|
|
|
- instantiated.
|
|
|
-
|
|
|
.. attribute:: merged
|
|
|
|
|
|
Returns a :class:`LineString` representing the line merge of
|
|
@@ -817,8 +780,6 @@ Geometry Collections
|
|
|
|
|
|
.. attribute:: closed
|
|
|
|
|
|
- .. versionadded:: 1.10
|
|
|
-
|
|
|
Returns ``True`` if and only if all elements are closed. Requires GEOS 3.5.
|
|
|
|
|
|
``MultiPolygon``
|
|
@@ -834,11 +795,6 @@ Geometry Collections
|
|
|
>>> mp = MultiPolygon(p1, p2)
|
|
|
>>> mp = MultiPolygon([p1, p2])
|
|
|
|
|
|
- .. versionchanged:: 1.10
|
|
|
-
|
|
|
- In previous versions, an empty ``MultiPolygon`` couldn't be
|
|
|
- instantiated.
|
|
|
-
|
|
|
``GeometryCollection``
|
|
|
----------------------
|
|
|
|
|
@@ -852,11 +808,6 @@ Geometry Collections
|
|
|
>>> gc = GeometryCollection(Point(0, 0), MultiPoint(Point(0, 0), Point(1, 1)), poly)
|
|
|
>>> gc = GeometryCollection((Point(0, 0), MultiPoint(Point(0, 0), Point(1, 1)), poly))
|
|
|
|
|
|
- .. versionchanged:: 1.10
|
|
|
-
|
|
|
- In previous versions, an empty ``GeometryCollection`` couldn't be
|
|
|
- instantiated.
|
|
|
-
|
|
|
.. _prepared-geometries:
|
|
|
|
|
|
Prepared Geometries
|
|
@@ -978,10 +929,6 @@ include the SRID value (in other words, EWKB).
|
|
|
:attr:`WKBWriter.outdim` documentation for more details about the ``dim``
|
|
|
argument.
|
|
|
|
|
|
- .. versionchanged:: 1.10
|
|
|
-
|
|
|
- The ability to pass the ``dim`` argument to the constructor was added.
|
|
|
-
|
|
|
.. method:: WKBWriter.write(geom)
|
|
|
|
|
|
Returns the WKB of the given geometry as a Python ``buffer`` object.
|
|
@@ -1071,11 +1018,6 @@ include the SRID value (in other words, EWKB).
|
|
|
:attr:`WKBWriter.outdim`, :attr:`trim`, and :attr:`precision` attributes for
|
|
|
details about the constructor arguments.
|
|
|
|
|
|
- .. versionchanged:: 1.10
|
|
|
-
|
|
|
- The ability to pass the ``dim``, ``trim``, and ``precision`` arguments
|
|
|
- to the constructor was added.
|
|
|
-
|
|
|
.. method:: WKTWriter.write(geom)
|
|
|
|
|
|
Returns the WKT of the given geometry. Example::
|
|
@@ -1092,8 +1034,6 @@ include the SRID value (in other words, EWKB).
|
|
|
|
|
|
.. attribute:: WKTWriter.trim
|
|
|
|
|
|
- .. versionadded:: 1.10
|
|
|
-
|
|
|
This property is used to enable or disable trimming of
|
|
|
unnecessary decimals.
|
|
|
|
|
@@ -1110,8 +1050,6 @@ include the SRID value (in other words, EWKB).
|
|
|
|
|
|
.. attribute:: WKTWriter.precision
|
|
|
|
|
|
- .. versionadded:: 1.10
|
|
|
-
|
|
|
This property controls the rounding precision of coordinates;
|
|
|
if set to ``None`` rounding is disabled.
|
|
|
|