<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    No problems at least on the other side of bindings:<br>
    <br>
    my $g = Geo::OGR::Geometry->new(<br>
        WKT=>'MULTIPOLYGON(((1 1,5 1,5 5,1 5,1 1),(2 2, 3 2, 3 3, 2
    3,2 2)),((3 3,6 2,6 4,3 3)))');<br>
    my $h = $g->ForceToPolygon;<br>
    <br>
    say $h->AsText;<br>
    say $h->As(Format=>'GeoJSON');<br>
    <br>
    output:<br>
    <br>
    POLYGON ((1 1,5 1,5 5,1 5,1 1),(2 2,3 2,3 3,2 3,2 2),(3 3,6 2,6 4,3
    3))<br>
    { "type": "Polygon", "coordinates": [ [ [ 1.0, 1.0 ], [ 5.0, 1.0 ],
    [ 5.0, 5.0 ], [ 1.0, 5.0 ], [ 1.0, 1.0 ] ], [ [ 2.0, 2.0 ], [ 3.0,
    2.0 ], [ 3.0, 3.0 ], [ 2.0, 3.0 ], [ 2.0, 2.0 ] ], [ [ 3.0, 3.0 ], [
    6.0, 2.0 ], [ 6.0, 4.0 ], [ 3.0, 3.0 ] ] ] }<br>
    <br>
    Ari<br>
    <br>
    <div class="moz-cite-prefix">On 02.11.2015 17:13, Gane R wrote:<br>
    </div>
    <blockquote
cite="mid:CALMrLdBM2VYRFGivS+MWEiKQ3oZVDtr2HFqRZ9V=60p1JKrhuQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>I am reading a file geodb and trying to convert
            multipolygon to Polygon<br>
            OGRGeometry *pGeom = NULL;<br>
                                        OGRGeometry *pForced = NULL;<br>
                                        pGeom =
            pOGRFeature->StealGeometry();<br>
                                        if(pGeom != NULL)<br>
                                        {<br>
                                            pForced =
            OGRGeometryFactory::forceToPolygon(pGeom);<br>
                                            if(pForced != NULL)<br>
                                            {<br>
                                               
            pOGRFeature->SetGeometryDirectly(pForced);<br>
                                            }<br>
                                        }<br>
            <br>
            char *pJsonString = pSrcGeom->exportToJson(); //Causes
            crash ...<br>
            <br>
          </div>
          Do any experience these ?<br>
        </div>
        Gane<br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>