<p>i'm using geos c++ interface.</p><p>i need  to <span style="font-family: Roboto, sans-serif;">Gets the cells in the Voronoi diagram and </span><span style="font-family: Roboto, sans-serif;"> the </span><span style="color: rgb(70, 101, 162); font-weight: bold; font-family: Roboto, sans-serif;">C</span>oordinate<span style="font-family: Roboto, sans-serif;"> of the cell site. </span></p><p>here is the code:</p><p> std::auto_ptr<GeometryCollection> polys = subdiv->getVoronoiDiagram(geomFact);<br> for (std::size_t i = 0; i < polys->getNumGeometries(); ++i)</p><p> {<br>  Coordinate *c = (Coordinate*)((Geometry*)(polys->getGeometryN(i)))->getUserData(); </p><p> }</p><p>but the Coordinate of coordinate* c does not equal to any of my input sites.</p><p>am i using the c++ api in the wrong way?please help me correct my mistakes.</p><p>temporarily,i modified  geos-3.6.1\src\triangulate\quadedge\QuadEdgeSubdivision.cpp line 586 to</p><p><span class="Apple-tab-span" style="white-space:pre">  </span>cellPoly->setUserData(reinterpret_cast<void*>(geomFact.createPoint(c)));</p><p><br></p><div></div>