[fdo-users] How does FDO handle invalid fgf geometries?
Mateusz Loskot
mateusz at loskot.net
Thu Aug 21 10:50:58 EDT 2008
Jackie Ng wrote:
> Hi All,
>
> How does FDO handle invalid FGF binary data?
Jackie,
From my experience, I've observed that FDO does not strictly
validate FGF/WKB input on geometry creation.
Actually, GeometryFactory checks if WKB stream has minimal length of 9
bytes and it does not prevent to create geometry from bytes stream of
garbage.
Here is a small test of valid and invalid WKB input (see main function):
http://mateusz.loskot.net/tmp/fdo/test_geometry_factory.cpp.html
This is the result of 3 test cases included in the test:
Expected WKT: POINT(15.123 21.456)
Output WKT : POINT (-7.84591113289983e+298 0)
Expected WKT: POINT(15.123 21.456)
Output WKT : POINT (15.123 21.456)
*** FDO Error:
*** (.\Src\Geometry\Fgf\GeometryFactory.cpp: 568)
FDO_1_INVALID_INPUT_ON_CLASS_CREATION
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
More information about the fdo-users
mailing list