<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Ahmet,</p>
<p>use the OGRGeometryFactory::forceTo(geom, wkbGeometrycollection)
method:<br>
</p>
<p><a class="moz-txt-link-freetext" href="https://gdal.org/api/ogrgeometry_cpp.html#classOGRGeometryFactory_1a26120382ccfec8ac4b5f932dd3a67c5f">https://gdal.org/api/ogrgeometry_cpp.html#classOGRGeometryFactory_1a26120382ccfec8ac4b5f932dd3a67c5f</a><br>
</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 13/06/2021 à 20:45, Ahmet Temiz a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAJKO1Ys5tyepu9zyMC+4gAqXUsWxav1Wu8Jk3NNsDsN5wyObTA@mail.gmail.com">
<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" class="gmail_signature"
data-smartmail="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>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-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="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>