<div dir="ltr"><div class="gmail_default" style="font-size:small">Thanks, I'll check it out. <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 13, 2021 at 9:53 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Ahmet,</p>
<p>use the OGRGeometryFactory::forceTo(geom, wkbGeometrycollection)
method:<br>
</p>
<p><a href="https://gdal.org/api/ogrgeometry_cpp.html#classOGRGeometryFactory_1a26120382ccfec8ac4b5f932dd3a67c5f" target="_blank">https://gdal.org/api/ogrgeometry_cpp.html#classOGRGeometryFactory_1a26120382ccfec8ac4b5f932dd3a67c5f</a><br>
</p>
<p>Even<br>
</p>
<div>Le 13/06/2021 à 20:45, Ahmet Temiz a
écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default">Hi,</div>
<div class="gmail_default">I exported the geometry to geojson
as:</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">OGRMultiPolygon * poOGRMultiPolygon=
(OGRMultiPolygon * ) unionCascaded;<br>
//<br>
char * pszJSon= poOGRMultiPolygon->exportToJson();<br>
</div>
<div><br>
</div>
<div>
<div class="gmail_default">this generates:</div>
<div class="gmail_default"> "type": "MultiPolygon",
"coordinates": ....</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">But. I need geometrycollection.</div>
<div class="gmail_default">How can I do that?</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">regards</div>
<br>
</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>Ahmet Temiz<br>
Jeoloji Müh.<br>
Afet ve Acil Durum Yönetimi Başkanlığı<br>
Deprem Dairesi Başkanlığı<br>
<br>
<br>
________________________<br>
<br>
Ahmet Temiz<br>
Geological Eng.<br>
<br>
Disaster and Emergency Management<br>
of Presidency</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Ahmet Temiz<br>Jeoloji Müh.<br>Afet ve Acil Durum Yönetimi Başkanlığı<br>Deprem Dairesi Başkanlığı<br><br><br>________________________<br><br>Ahmet Temiz<br>Geological Eng.<br><br>Disaster and Emergency Management<br>of Presidency</div></div></div></div></div></div></div>