[geos-devel] C API and Coordinates
novalis at novalis.org
Fri Aug 14 12:50:55 EDT 2009
It looks like the C API doesn't really support Coordinates. The only
way I can figure out to pass Coordinates is to use Geometry* as a
parameter, and use dynamic_cast<Point *> to ensure that the Geometry is
Point. This leads to long-winded code -- not to mention a lack of
I've attached a patch which demonstrates the approach I describe above.
Unfortunately, it's not a very clean patch, because I realized I had
forgotten to completely constify the linearref code. When I submit a
final patch, I'll break the const changes out into a separate patch.
The alternative is that I could simply declare Coordinate in the C API.
I'm not sure what consequences that would have, or why it was rejected
in the first place -- but it would simplify the code here and perhaps
Please let me know what approach is most likely to get my patch
accepted, or if there's something obvious that I'm missing.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8627 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20090814/81a0a48c/c_api_initial_stab.bin
More information about the geos-devel