Skip to content

Commit

Permalink
Make sure documentation uses Python 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Trigona-Harany committed Apr 17, 2022
1 parent 697b3df commit 65ca314
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions doc/source/subclasses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ Coordinates may be accessed and modified after creation.
.. code-block:: python
>>> point = Point((0, 0))
>>> print point.x
>>> print(point.x)
0
>>> point.x = 10
>>> print point.x
>>> print(point.x)
10
Composition
Expand Down Expand Up @@ -78,13 +78,13 @@ The ``dimz`` and ``dimm`` boolean parameters will indicate whether the geometry
.. code-block:: python
>>> p1 = Point((0, 0, 1), dimz=True, dimm=True)
>>> print "p1", p1.x, p1.y, p1.z, p1.m
>>> print("p1", p1.x, p1.y, p1.z, p1.m)
p1 0 0 1 0
>>> p2 = Point((0, 0, 1), dimm=True)
>>> print "p2", p2.x, p2.y, p2.z, p2.m
>>> print("p2", p2.x, p2.y, p2.z, p2.m)
p2 0 0 None 1
>>> p3 = Point((0, 0, 1, 2))
>>> print "p3", p3.x, p3.y, p3.z, p3.m
>>> print("p3", p3.x, p3.y, p3.z, p3.m)
p3 0 0 1 2
The dimensionality of an existing instance may be altered after creation, by setting ``dimz`` or ``dimm``. Adding a dimension will add a Z or M coordinate with an initial value of ``0`` to the geometry and all geometries encompassed within it (*e.g.*, each vertex in a :class:`LineString <plpygis.geometry.LineString>` or each :class:`Point <plpygis.geometry.Point>` in a :class:`MultiPoint <plpygis.geometry.MultiPoint>` will gain the new dimension).
Expand All @@ -98,17 +98,17 @@ Adding a new dimension to a :class:`Point <plpygis.geometry.Point>` that is a ve
>>> p1 = Point((0, 0))
>>> p2 = Point((1, 1))
>>> mp = MultiPoint([p1, p2])
>>> print mp.dimz
>>> print(mp.dimz)
False
>>> p1.z = 2
>>> print p1.miz
>>> print(p1.miz)
True
>>> print mp.dimz
>>> print(mp.dimz)
False
>>> mp.dimz = True
>>> print mp.dimz
>>> print(mp.dimz)
True
>>> print "p1.z", p1.z, "p2.z", p2.z
>>> print("p1.z", p1.z, "p2.z", p2.z)
p1.z 2 p2.z 0
Performance considerations
Expand Down
2 changes: 1 addition & 1 deletion doc/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Conversion
>>> from plpygis import Geometry
>>> geom = Geometry("01010000000000000000004AC00000000000000000")
>>> print geom.shapely
>>> print(geom.shapely)
POINT (-52 0)
:class:`Geometry <plpygis.geometry.Geometry>` also implements :attr:`__geo_interface__ <plpygis.geometry.Geometry.__geo_interface__>`.
Expand Down

0 comments on commit 65ca314

Please sign in to comment.