

def _set_list(self, length, items):
    ndim = self._cs.dims
    hasz = self._cs.hasz
    cs = GEOSCoordSeq(capi.create_cs(length, ndim), z=hasz)
    for (i, c) in enumerate(items):
        cs[i] = c
    ptr = self._init_func(cs.ptr)
    if ptr:
        capi.destroy_geom(self.ptr)
        self.ptr = ptr
        self._post_init(self.srid)
    else:
        raise GEOSException('Geometry resulting from slice deletion was invalid.')

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/gis/geos/linestring.py LineString._set_list/original