Ticket #5072: geodjango.diff

File geodjango.diff, 684 bytes (added by phil.django@…, 17 years ago)

geometries patch for 3D LineString

  • contrib/gis/geos/geometries.py

     
    166166            raise TypeError, 'Invalid initialization input for LineStrings.'
    167167
    168168        # Creating the coordinate sequence
    169         cs = GEOSCoordSeq(GEOSPointer(0, create_cs(c_uint(ncoords), c_uint(ndim))))
     169        cs = GEOSCoordSeq(GEOSPointer(0, create_cs(c_uint(ncoords), c_uint(ndim))), z=bool(ndim==3))
    170170
    171171        # Setting each point in the coordinate sequence
    172172        for i in xrange(ncoords):
    173173            if numpy_coords: cs[i] = coords[i,:]
Back to Top