[fdo-dev] [Proposal] FGF<->WKB converters as common utils

Mateusz Loskot mateusz at loskot.net
Tue Aug 8 17:15:40 EDT 2006

Gavin Cramer wrote:
> Those functions are part of the FDO SDK.  Any provider can use them,
> as well as any client.
> Excluding the factory, FdoGeometry is a pure API too -- one can even 
> re-implement it to be a wrapper around any other geometry package,
> and just call FdoGeometryFactoryAbstract::CreateGeometry(FdoIGeometry
> * geometry) to do all conversions.  Note that FdoFgfGeometryFactory 
> extends the non-FGF-specific FdoGeometryFactoryAbstract, and that all
>  FGF-specific methods are in that one FdoFgfGeometryFactory class.


Excause me, but I think there is some misunderstanding.
The purpose of FdoGeometry and FdoFgfGeometryFactory APIs
is clear for me.

I'm talking about GeometryFromWkb() and WkbFromGeometry()
functions (which are not a part of the SDK and public API) from:


I'm working on PostGIS provider and I need exactly the same functions.
So, there are two options:
1) copy Geometry.c and Geometry.h to the PostGIS provider directory
2) copy Geometry.c and Geometry.h to some common place for all providers

The second possibility is IMHO the best because of code reuse practice
and to not to keep *the same* code in more than one places.

That was just an idea, and I'd not want to start long discussion about
such a trivial thing :-)
So, I'll just keep my own copy of Geometry.h and Geometry.c files

Best regards
Mateusz Loskot

More information about the Fdo-internals mailing list