<div dir="ltr"><div><div><div><div><div>Ok,<br></div>I'll try tomorow using exclusively functions from geos_c.h.<br></div>Is there some kind of example/tutorial arround?<br></div><br></div>Another 2 quick questions : <br>I would like to perform a polygon/polygon intersection.<br></div>  I can't find if there is a shortcut for the case where the two geometry are disjoint (in which case the intersection would be empty geom)<br><div><div><div>  Shall I put myself this kind of shortcut before calling intersection?<br><br></div><div>About the new rectangle shortcuts . Are the rectangle bbox (north/South East-West oriented), or are they real rectangle (oriented bbox)? <br></div><div><br>Cheers,<br>Rémi-C<br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-10 18:36 GMT+02:00 Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Oct 10, 2014 at 05:59:35PM +0200, Rémi Cura wrote:<br>
> Hello,<br>
> trying to use Geos C Api in a  Cpp program.<br>
> The Cpp programm uses CMake.<br>
><br>
> Apparently the easy way to incorporate GEOS is by copying the QGIS solution.<br>
> I copy the FindGEOS.cmake file<br>
</span>> <<a href="https://raw.githubusercontent.com/qgis/QGIS/master/cmake/FindGEOS.cmake" target="_blank">https://raw.githubusercontent.com/qgis/QGIS/master/cmake/FindGEOS.cmake</a>><br>
<span class="">> then ad the path to it in CMakeList.txt<br>
>     set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}")<br>
><br>
> then using the regular<br>
>   FIND_PACKAGE(GEOS REQUIRED)<br>
> fills GEOS_LIBRARY and GEOS_INCLUDE_DIR.<br>
><br>
> Then I add GEOS LIBRARY has a target for link :<br>
> TARGET_LINK_LIBRARIES(simple_snapping.bin ${CERES_LIBRARIES}<br>
> ${GEOS_LIBRARY})<br>
><br>
><br>
> After that I'm stuck,<br>
> If I try to use Geos function I get an error by<br>
> ld :<br>
> " geometry_function.cc:-1: error: undefined reference to<br>
> `geos::io::WKTReader::WKTReader()'"<br>
><br>
> Anybody has an idea of how to fix this?<br>
<br>
</span>Is geos::io::WKTReader::WKTReader used by your geometry_function.cc ?<br>
That's the C++ API, not the C one.<br>
<br>
--strk;<br>
_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geos-devel" target="_blank">http://lists.osgeo.org/mailman/listinfo/geos-devel</a><br>
</blockquote></div><br></div>