summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2015-11-26 02:25:22 +0500
committerTim Graham <timograham@gmail.com>2015-11-25 16:30:50 -0500
commit78627091f890061831f29085c5c5b47036be5cc6 (patch)
tree712dd978ba40436569734c2b21f4770369cbef88 /docs
parent834ad41472e240e951230e52aa698ae7a3d52eb9 (diff)
[1.8.x] Fixed #25649 -- Documented that all GEOSGeometry constructors take srid kwarg.
Backport of a3708fda3574a5a0d949000df1b03a54721cf029 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/gis/geos.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/ref/contrib/gis/geos.txt b/docs/ref/contrib/gis/geos.txt
index c07d79381b..69670dd3d5 100644
--- a/docs/ref/contrib/gis/geos.txt
+++ b/docs/ref/contrib/gis/geos.txt
@@ -65,6 +65,16 @@ created by passing in the X and Y coordinates into its constructor::
>>> from django.contrib.gis.geos import Point
>>> pnt = Point(5, 23)
+All these constructors take the keyword argument ``srid``. For example::
+
+ >>> from django.contrib.gis.geos import GEOSGeometry, LineString, Point
+ >>> print(GEOSGeometry('POINT (0 0)', srid=4326))
+ SRID=4326;POINT (0.0000000000000000 0.0000000000000000)
+ >>> print(LineString((0, 0), (1, 1), srid=4326))
+ SRID=4326;LINESTRING (0.0000000000000000 0.0000000000000000, 1.0000000000000000 1.0000000000000000)
+ >>> print(Point(0, 0, srid=32140))
+ SRID=32140;POINT (0.0000000000000000 0.0000000000000000)
+
Finally, there is the :func:`fromfile` factory method which returns a
:class:`GEOSGeometry` object from a file::