<div dir="ltr"><div><div><br><br>On Thu, Sep 28, 2017 at 10:45 PM, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br>><br>[...]<br>><br>> Ah, and related with that, starting with GDAL 2.2, you can also get new geometry types, TRIANGLE, TIN and POLYHEDRALSURFACE.<br>><br>> <a href="https://trac.osgeo.org/gdal/wiki/rfc64_triangle_polyhedralsurface_tin">https://trac.osgeo.org/gdal/wiki/rfc64_triangle_polyhedralsurface_tin</a><br>><br>> TIN can typically be found in some shapefiles and FileGDB. POLYHEDRALSURFACE from some GML.<br>><br>> To test easily, you can create a simple csv:<br>><br>> id,WKT<br>> 1,"TRIANGLE ((0 0,0 1,1 1,0 0))"<br>> 2,"TIN (((0 0,0 1,1 1,0 0)))"<br>> 3,"POLYHEDRALSURFACE (((0 0,0 1,1 1,0 0)))"<br>><br>> If you don't want to directly deal with those beasts in their native form, you can force them to more standard types with:<br>> wkbTriangle : OGR_G_ForceTo( , wkbPolygon)<br>> wkbTIN / wkbPolyhedralSurface: OGR_G_ForceTo( , wkbMultiPolygon)<br><br></div>I tested with v.in.ogr, and OGR_G_GetLinearGeometry() does not convert these beasts into a linear geometry.<br><br>Testing around a bit, the difference between OGR_G_GetLinearGeometry() and OGR_G_ForceTo() is very useful. I would prefer to leave the decision if these beasts can be safely converted to a linear form with OGR_G_GetLinearGeometry() to the GDAL/OGR developers. They (have to, I guess) spend a lot of time thinking about these geometry types coming from OpenGIS Simple Feature specifications and currently 84 OGR drivers.<br><br></div>Markus M<br><div><div>><br>> Even<br>><br>>  <br>><br>> --<br>><br>> Spatialys - Geospatial professional services<br>><br>> <a href="http://www.spatialys.com">http://www.spatialys.com</a><br><br></div></div></div>