From a3708fda3574a5a0d949000df1b03a54721cf029 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Thu, 26 Nov 2015 02:25:22 +0500 Subject: [PATCH] Fixed #25649 -- Documented that all GEOSGeometry constructors take srid kwarg. --- docs/ref/contrib/gis/geos.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/ref/contrib/gis/geos.txt b/docs/ref/contrib/gis/geos.txt index e27109cfa2..abe22aad2f 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::