I read a few posts here at GIS.SE that points to useful algorithms in CGAL. I'd like to test algorithms in CGAL such as medial axis transformation/polygon skeleton extraction, but the examples on the CGAL website are using text files or eps for input/output.

And I am just wondering what's the best way to use shapefiles and other common GIS formats in CGAL?

For example, can I convert polgon shapefiles to a common data format that CGAL reads/writes?


You'll want to check out SFCGAL, a wrapper library for CGAL that exposes CGAL functionality in terms of OGC Simple Features. If you load your shapefiles into PostGIS, you can call many SFCGAL operations directly - there's a list in the PostGIS docs.

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.