﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
25585	OGRGeometry.srid and OGRGeometry.srs cannot be set to None	Sergey Fedoseev	nobody	"{{{
In [1]: from django.contrib.gis.gdal import OGRGeometry

In [2]: p = OGRGeometry('POINT(1 1)')

In [3]: print p.srs
None

In [4]: p.srs = p.srs
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-d4701752b51c> in <module>()
----> 1 p.srs = p.srs

/home/sergey/dev/django/django/contrib/gis/gdal/geometries.pyc in _set_srs(self, srs)
    272             srs_ptr = sr.ptr
    273         else:
--> 274             raise TypeError('Cannot assign spatial reference with object of type: %s' % type(srs))
    275         capi.assign_srs(self.ptr, srs_ptr)
    276

TypeError: Cannot assign spatial reference with object of type: <type 'NoneType'>

In [5]: print p.srid
None

In [6]: p.srid = p.srid
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-6-3612b78cc827> in <module>()
----> 1 p.srid = p.srid

/home/sergey/dev/django/django/contrib/gis/gdal/geometries.pyc in _set_srid(self, srid)
    288             self.srs = srid
    289         else:
--> 290             raise TypeError('SRID must be set with an integer.')
    291
    292     srid = property(_get_srid, _set_srid)

TypeError: SRID must be set with an integer.
}}}
"	Bug	closed	GIS	dev	Normal	fixed			Accepted	1	0	0	0	0	0
