<p dir="ltr">On 12 Dec 2013 22:58, "Even Rouault" <<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>> wrote:<br>
><br>
> Le jeudi 12 décembre 2013 23:39:25, Paul Ramsey a écrit :<br>
> > It also seems the wkb reader/writer have little handling for empty geometry<br>
> > types. I’d like to add some in, if that’s OK.<br>
><br>
> Are you sure about that ?<br>
><br>
> See :<br>
><br>
> >>> from osgeo import ogr<br>
> >>> ogr.CreateGeometryFromWkb(g.ExportToWkb()).ExportToWkt()<br>
> 'LINESTRING EMPTY'<br>
> >>> ogr.CreateGeometryFromWkb(ogr.CreateGeometryFromWkt('LINESTRING<br>
> EMPTY').ExportToWkb()).ExportToWkt()<br>
> 'LINESTRING EMPTY'<br>
> >>> ogr.CreateGeometryFromWkb(ogr.CreateGeometryFromWkt('LINESTRING<br>
> EMPTY').ExportToWkb()).ExportToWkt()<br>
> 'LINESTRING EMPTY'<br>
> >>> ogr.CreateGeometryFromWkb(ogr.CreateGeometryFromWkt('POLYGON<br>
> EMPTY').ExportToWkb()).ExportToWkt()<br>
> 'POLYGON EMPTY'<br>
> >>> ogr.CreateGeometryFromWkb(ogr.CreateGeometryFromWkt('MULTILINESTRING<br>
> EMPTY').ExportToWkb()).ExportToWkt()<br>
> 'MULTILINESTRING EMPTY'<br>
> >>> ogr.CreateGeometryFromWkb(ogr.CreateGeometryFromWkt('MULTIPOLYGON<br>
> EMPTY').ExportToWkb()).ExportToWkt()<br>
> 'MULTIPOLYGON EMPTY'<br>
> >>> ogr.CreateGeometryFromWkb(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION<br>
> EMPTY').ExportToWkb()).ExportToWkt()<br>
> 'GEOMETRYCOLLECTION EMPTY'<br>
><br>
> The only exception is POINT EMPTY due to the lack of wkb representation for it<br>
> :<br>
> >>> ogr.CreateGeometryFromWkb(ogr.CreateGeometryFromWkt('POINT<br>
> EMPTY').ExportToWkb()).ExportToWkt()<br>
> 'POINT (0 0)'</p>
<p dir="ltr">See <br>
<a href="http://blog.cleverelephant.ca/2010/03/nothing-nada-zip-bupkus.html">http://blog.cleverelephant.ca/2010/03/nothing-nada-zip-bupkus.html</a></p>
<p dir="ltr">-- <br>
Mateusz Łoskot, <a href="http://mateusz.loskot.net">http://mateusz.loskot.net</a><br>
(Sent from mobile, apology for top-posting or broken quotes)</p>