Index: contrib/gis/geos/geometries.py
===================================================================
--- contrib/gis/geos/geometries.py	(revision 5788)
+++ contrib/gis/geos/geometries.py	(working copy)
@@ -166,13 +166,13 @@
             raise TypeError, 'Invalid initialization input for LineStrings.'
 
         # Creating the coordinate sequence
-        cs = GEOSCoordSeq(GEOSPointer(0, create_cs(c_uint(ncoords), c_uint(ndim))))
+        cs = GEOSCoordSeq(GEOSPointer(0, create_cs(c_uint(ncoords), c_uint(ndim))), z=bool(ndim==3))
 
         # Setting each point in the coordinate sequence
         for i in xrange(ncoords):
             if numpy_coords: cs[i] = coords[i,:]
