Feature #464

gmtspatial -Si|j|u

Added by Eduardo about 4 years ago. Updated about 4 years ago.

Status:FeedbackStart date:2013-12-21
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


Please complete the remaining -Si|j|u sub-options in gmtspatial.


#1 Updated by Paul about 4 years ago

  • Status changed from New to Feedback

Our initial discussions on this involved using this library: http://www.cs.man.ac.uk/~toby/alan/software/gpc.html. As far as I could tell it is not maintained and distributed with package managers so it would have to be shipped with GMT, like triangle is, and we would have to supply some code to translate between GMT's GMT_DATASET structures and his internal representations. Then we should be able to call upon this library. It could be an optional install, like triangle. Of course, this is all Cartesian stuff so would not be useful for spherical polygons, which is a drag. If you or anyone else are aware of a more suitable library that is more standard (i.e., distributed via packages) then we could loko into that,

#2 Updated by Joaquim about 4 years ago

Well, gpc is what I use in Mirone but the Matlab FEX advertise this one as being faster


and there is also GEOS which is an (optional) GDAL dependency. They are both C++ which is not a particularly healthy thing but maybe GEOS can be accessed via the C wrappers in GDAL.

#3 Updated by Paul about 4 years ago

In fact, the documentation said the way to access GOES capabilities is via the GDAL C wrappers. Much more the documentation does not say, at least I have not yet found that part. Given the support of GEOS/GDAL this could be a good solution for polygon intersections and unions.

#4 Updated by Eduardo about 4 years ago

I like GEOS!!!

  • It has community support
  • It is actively maintanied.
  • It has a C API
  • It has ports to Unix. Windows an OSX.

To use the C API is only linking against libgeos_c.so and include the geos_c.h header file.


Also available in: Atom PDF