예제 #1
0
 def _checkindex(self, index):
     "Internal routine for checking the given ring index."
     if index < 0 or index >= len(self):
         raise GEOSIndexError('invalid Polygon ring index: %s' % index)
예제 #2
0
파일: coordseq.py 프로젝트: zhumin/django
 def _checkindex(self, index):
     "Checks the given index."
     sz = self.size
     if (sz < 1) or (index < 0) or (index >= sz):
         raise GEOSIndexError('invalid GEOS Geometry index: %s' %
                              str(index))
예제 #3
0
 def _checkindex(self, index):
     "Checks the given geometry index."
     if index < 0 or index >= self.num_geom:
         raise GEOSIndexError('invalid GEOS Geometry index: %s' %
                              str(index))