<div dir="ltr"><div class="gmail_default" style="font-size:small">Ok, thanks. <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 1, 2019 at 8:39 AM Casper Børgesen <<a href="mailto:caboe@sdfe.dk">caboe@sdfe.dk</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 lang="DA">
<div class="gmail-m_-7832164244339082745WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">A very quick guess would be that you have changed the polyCollect type from a geometry type to a list of geometries. I
don’t think the list of geometries has a UnionCascaded method. I would probably go for a polyCollect geometry type of MultiPolygon instead of the list/vector, that way you should be able to run the UnionCascaded method.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">/Casper<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif"> gdal-dev <<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a>>
<b>On Behalf Of </b>Ahmet Temiz<br>
<b>Sent:</b> 29. juni 2019 19:47<br>
<b>To:</b> gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>><br>
<b>Subject:</b> [gdal-dev] UnionCascaded operation failed<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Using C++ I try to buffers from LineStrings,Then I want to union the
<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">resulting polygons with UnionCascaded. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">But at UnionCascaded operation failed with:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">"error: ‘class std::vector<OGRPolygon*>’ has no member named ‘UnionCascaded’<br>
OGRGeometry *result=polyCollect.UnionCascaded();<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Can you tell me what I am doing wrong?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">here is the related code fragment:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"> std::vector<OGRPolygon * > polyCollect ;<br>
//OGRGeometryCollection *polyCollect ;<br>
<br>
while( (poFeature = poLayer->GetNextFeature()) != NULL )<br>
{<br>
<br>
OGRGeometry *poGeometry = poFeature->GetGeometryRef();<br>
<br>
if( poGeometry != NULL<br>
&& wkbFlatten(poGeometry->getGeometryType()) == wkbLineString )<br>
{<br>
OGRLineString *poLine = (OGRLineString *) poGeometry;<br>
//<br>
OGRGeometry *bufGeometry = poLine->Buffer(100,30);<br>
OGRPolygon *bufPoly= static_cast<OGRPolygon *> (bufGeometry) ;<br>
printf( "%s \n", bufPoly->getGeometryName());<br>
<br>
//polyCollect->addGeometryDirectly (bufPoly );<br>
polyCollect.push_back(bufPoly );<br>
}<br>
else<br>
{<br>
printf( "no point geometry\n" );<br>
}<br>
<br>
OGRFeature::DestroyFeature( poFeature );<br>
}<br>
<br>
OGRGeometry *result=polyCollect.UnionCascaded();<u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Ahmet Temiz<br>
Jeoloji Müh.<br>
Afet ve Acil Durum Yönetimi Başkanlığı<br>
Bilgi İşlem Dairesi Başkanlığı-CBS Grubu<br>
<br>
<br>
________________________<br>
<br>
Ahmet Temiz<br>
Geological Eng.<br>
Information Systems - GIS Group<br>
Disaster and Emergency Management<br>
of Presidency<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Ahmet Temiz<br>Jeoloji Müh.<br>Afet ve Acil Durum Yönetimi Başkanlığı<br>Bilgi İşlem Dairesi Başkanlığı-CBS Grubu<br><br><br>________________________<br><br>Ahmet Temiz<br>Geological Eng.<br>Information Systems - GIS Group<br>Disaster and Emergency Management<br>of Presidency</div></div></div></div></div>