'Checks the given index.'

def _checkindex(self, index):

    sz = self.size
    if ((sz < 1) or (index < 0) or (index >= sz)):
        raise GEOSIndexError(('invalid    GEOS    Geometry    index:    %s' % str(index)))
