<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello GDAL-DEV-Team,<br>
      <br>
      recently I faced a problem, which I wasn't able to solve. It
      regards to ogr2ogr Oracle Spatial to Shape-file convertion:<br>
      <br>
      <br>
      <br>
      We're holding geodata in an Orcale database (11g) with spatial
      extension. I want to unload specific polygons and convert them
      into Shape for further local processing.<br>
      <br>
      The table where I'm unloading from holds polygons/multipolygons:
      Oracle Spatial GeomTypes are 4003 and 4007 (4D-Polygon and
      4D-Multipolygon - third and fourth axis are not used however).<br>
      <br>
      For unloading and conversion I use this command within a
      python-script:<br>
      <br>
      <i>ogr2ogr.main(["", "-f", "ESRI Shapefile", result_path +
        query_result, connection_params,"-nlt", "MULTIPOLYGON", "-sql",
        the_sql_query_here])</i><br>
      <br>
      <br>
      Connection and full conversion only seems to work for polygons
      with GeomType 4003 however. The geometry-parts of
      multipartpolygons or polygons with wholes (GeomType 4007) are
      completely missing in the shape-file (white gaps within the map).
      Non-spatial attributes and values of these objects appear in the
      shape-file object-table though. I already tried to rerun the
      command above with <i>POLYGON</i> or P<i>ROMOTE_TO_MULTI</i>
      instead of <i>MULTIPOLYGON</i> and <i>POLYGON</i>. No change in
      the result though.<br>
      <br>
      As an example I provide the geometry of an Oracle-Spatial-object,
      whose geometry could not be converted (its a two-part
      multipolygon):<br>
      <br>
      <i>MDSYS.SDO_GEOMETRY(4007,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1005,5,1,2,1,5,2,1,9,2,1,13,2,1,17,2,1,25,1005,5,25,2,1,29,2,1,33,2,1,37,2,1,41,2,1),MDSYS.SDO_ORDINATE_ARRAY(33433109.145,5711835.706,9999.9999,0,33433166.721,5711687.09,9999.9999,0,33433229.435,5711904.544,9999.9999,0,33433205.628,5711904.647,9999.9999,0,33433175.618,5711821.022,9999.9999,0,33433109.145,5711835.706,9999.9999,0,33433020.391,5711673.812,9999.9999,0,33433153.215,5711635.136,9999.9999,0,33433164.011,5711674.531,9999.9999,0,33433099.673,5711838.076,9999.9999,0,33433071.502,5711844.871,9999.9999,0,33433020.391,5711673.812,9999.9999,0))</i><br>
      <br>
      You can find more information, including pictures, here:<br>
      <i><br>
      </i><i><a class="moz-txt-link-freetext"
href="https://gis.stackexchange.com/questions/292942/gdal-ogr2ogr-oraclespatial-to-shape-multipolygons-with-wholes-multiparts-are-mi">https://gis.stackexchange.com/questions/292942/gdal-ogr2ogr-oraclespatial-to-shape-multipolygons-with-wholes-multiparts-are-mi</a></i><br>
      <br>
      My GDAL is v2.1.2. Any known caveats or workarounds regarding this
      problem?<br>
      <br>
      <br>
      Thank you very much and best regards,<br>
      knutella<br>
    </p>
  </body>
</html>