<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Martin,<br>
<blockquote
 cite="mid:e8e7199c0810100641o2233342erd0d2a333790abac2@mail.gmail.com"
 type="cite">
  <pre wrap="">Hi Carson,

On Wed, Oct 8, 2008 at 5:27 PM, Carson Farmer <a class="moz-txt-link-rfc2396E" href="mailto:carson.farmer@gmail.com">&lt;carson.farmer@gmail.com&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">When creating a MultiPolyline geometry, I am able to combine several
Polylines to form a single Multipolyline. However, when attempting to write
this out to a shapefile using QgsVectorFileWriter, the resulting file
contains no entries. I have inspected the Multipolylines, and they appear to
be valid, and the QgsGeometry is created without a problem.

Somewhere between feature.setGeometry(multi_geom) and writer.addFeature(),
the geometry information appears to be rendered invalid?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
fixed in r9469 :-)
  </pre>
</blockquote>
Again this is great, tested and works great for lines... However, the
same problem appears to be occurring with points.<br>
I will implement it as you have suggested below for now, but perhaps
this is something that should be fixed as well, or perhaps I am just
doing something wrong with the points :-p<br>
<blockquote
 cite="mid:e8e7199c0810100641o2233342erd0d2a333790abac2@mail.gmail.com"
 type="cite">
  <pre wrap="">When you do f.setGeometry() the geometry gets copied to the feature.
Copying multi-part geometries in GEOS &lt; 3.0 is slightly incorrect
because the geometries degenerate to more general geometry collection
class, which is not supported by QGIS... The fix forces GEOS not to
degenerate the clone.

It's possible to work around this problem also with earlier QGIS
versions. Geometry can be in QGIS represented in WKB or GEOS or both
formats. If you call e.g. wkbBuffer() / wkbSize() / wkbType() it will
create also WKB representation (if doesn't exist already) so when
geometry gets cloned later in setGeometry(), it will have already
correct WKB for QgsVectorFileWriter.
  </pre>
</blockquote>
Carson
</body>
</html>