[geos-devel] 2 proposed c-api additions
cfis at savagexi.com
Wed Jul 12 21:07:23 PDT 2006
Strk pointed me at the XML test suite as a good source of test data. So
using Ruby, I now load the xml test cases and can run them through the
SWIG bindings which use the c api.
To do this, however, requires adding 2 methods to the C API.
The first method is Geometry::normalize which converts a geometry to its
cannonincal form. Without this method, the results from performing
operations (like buffer) will be in some undetermined order and thus the
test fails since the actual result does not match the expected result.
Since this seems to be a generally useful method I'd like to add in to
the C API.
The second method is one I mentioned the other day, equalsExact. The
XMLTestRunner uses this method to verify that the expected and actual
results match. Unfortunately, using equals does not work since it
returns false in some cases where equalsExact returns true (you can set
a tolerance with equalsExact). Once again, this seems like a generally
useful method so I'd also like to add in to the C API.
On my local box I have added both of these methods to the C API, and the
SWIG bindings now generate the same results as the C++ API (i've only
done some of the tests so far).
Note that a number of the XML test cases fail using either API. For
example, in buffer.xml roughly half the tests fail. Is this a problem?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.refractions.net/pipermail/geos-devel/attachments/20060712/3d60cbc0/smime-0001.bin
More information about the geos-devel