﻿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
19366	GEOSIndexError when comparing geometries	Craig de Stigter	Claude Paroz	"In 1.5 (latest master) I get the following when comparing geometries of different lengths:

{{{
from django.contrib.gis.geos import *
a = Polygon(((0, 0), (0, 1), (1, 1), (1, 0), (0, 0)))
b = Polygon(((0, 0), (0, 1), (1, 0), (0, 0)))

a < b

Traceback (most recent call last):
  File ""<string>"", line 6, in <module>
  File ""/home/cdestigter/checkout/django/django/contrib/gis/geos/mutable_list.py"", line 164, in __lt__
    c = self[i] < other[i]
  File ""/home/cdestigter/checkout/django/django/contrib/gis/geos/mutable_list.py"", line 164, in __lt__
    c = self[i] < other[i]
  File ""/home/cdestigter/checkout/django/django/contrib/gis/geos/mutable_list.py"", line 80, in __getitem__
    index = self._checkindex(index)
  File ""/home/cdestigter/checkout/django/django/contrib/gis/geos/mutable_list.py"", line 245, in _checkindex
    raise self._IndexError('invalid index: %s' % str(index))
django.contrib.gis.geos.error.GEOSIndexError: 'invalid index: 4'

}}}

This does not occur on django 1.4.x.

`git bisect` tracks it down to this commit: https://github.com/django/django/commit/d04f72fb31bab43386e12963c1c6dec23ae16143 (""Got rid of old __cmp__methods replaced by rich comparison."")

python 2.6.5, GEOS 3.3.3-CAPI-1.7.4

marking as release blocker since it's a regression in 1.5.

"	Bug	closed	GIS	dev	Release blocker	fixed		craig.destigter@…	Ready for checkin	1	0	0	0	0	0
