[fdo-users] FDO Sqlite provider Fgf2Wkb function to support MultiCurveString

Greg Boone greg.boone at autodesk.com
Wed Mar 9 15:34:24 PST 2016

Hi Luc,

As far as I remember FGF is a super-set or extension to WKB. 

WKB supports 7 geometry types: Point (1), LineString (2), Polygon (3), MultiPoint (4), MultiLineString (5), MultiPolygon (6), GeometryCollection (7). 

FGF extends the types. Besides the 7 types, FGF also has CurveString (10), CurvePolygon (11), MultiCurveString (12), MultiCurvePolygon (13). 

If Autodesk Map uses FGF types such as CurveString by default, converting those to WKB would require some form of conversion to simpler types and such a conversion does offer some challenges. For example, Arcs segments may need to be tessellated into many simple points. This is probably why the Fgf2Wkb function did not handle these types when it was written. 

Some effort could be made to update Fgf2Wkb and that may prevent the crash, but I do wonder what kind of experience you would have in Map in your data was returned in a tessellated format and displayed as such in Map. 


-----Original Message-----
From: fdo-users [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of lucvanlinden
Sent: Tuesday, March 08, 2016 4:07 AM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] FDO Sqlite provider Fgf2Wkb function to support MultiCurveString


We are facing following issue:

Autodesk MAP 3D 2016 + FDO sqlite Provider 4.0. 

If the sqlite file Layer/tables are set to use the WKB encoding, instead of FGF encoding, MAP 3D crashes when creating Linestrings. Map3D always passes MultiCurveString to the SQLiteProvider. However this geometry type is only supported by FGF encoding, not WKB encoding.

We need to use the WKB encoding in Sqlite for interoperability.


From the feedback from AutoDesk DEV team, they do not want to solve this crashing their end, this is due to the following function in the SQLITE fdo

FDO Sqlite provider has a method which converts FGF format to WKB format.
It’s in file
The method name is
int Fgf2Wkb(const unsigned char* fgf, unsigned char* wkb)

But it doesn’t support extended geometry types such as MultiCurveString. 


Would there be anyone to help us in getting this function extended to support the MultiCurveString?


View this message in context: http://osgeo-org.1560.x6.nabble.com/FDO-Sqlite-provider-Fgf2Wkb-function-to-support-MultiCurveString-tp5255042.html
Sent from the FDO Users mailing list archive at Nabble.com.
fdo-users mailing list
fdo-users at lists.osgeo.org

More information about the fdo-users mailing list