2

All this stuff looks rather useful: http://geos.osgeo.org/doxygen/classgeos_1_1noding_1_1Noder.html

However, from the GEOS README file:

The C++ interface should not be used directly; the geos project views it as a bug for another program to use the C++ interface or even to directly link against the C++ library.

Is there a C interface to the Noding functionality that I'm missing? I can't find it in geos_c.h.

  • From Shapely (GEOS port) I don't know how to access Noder functionality too. The solution may be related. – cag Feb 3 '13 at 23:19
  • 1
    I have found out that if you union or intersect a line geometry with itself, it comes back noded. But without any control over the noding algorithm. – Sideshow Bob Feb 4 '13 at 12:12
  • It isn't what I´ve expected, but works perfectly. Thanks! – cag Feb 4 '13 at 16:22
2

No, GEOS C API does not provide access to the Noder features.

The C++ interface should not be used directly; the geos project views it as a bug for another program to use the C++ interface or even to directly link against the C++ library.

This warning is mainly for those users who rely on GEOS from packaged binaries. This warning is to help avoid problems like those recently encountered by OSM projects, see osm2pgsql and libosmium. Please, read also through the geos-devel list thread status of C++ API - is it a bug to use it or not?.

However, if you are control build process of your software and instead of relying on packages with GEOS binaries (eg. from your Linux distribution packages), and you can build GEOS yourself, then you will be fine.

Typically, breaking changes in C++ API are not very extensive, so it should not be a huge task or hassle to update your own source to adjust to the changes.

I have used GEOS C++ API in such way for decade, in large projects too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.