[fdo-users] Fgf to Wkb

Traian Stanev traian.stanev at autodesk.com
Mon Dec 20 15:26:14 EST 2010



You can try the method used by the OGR provider. See OgrFdoUtil.cpp, function Fgf2Wkb. Similar method is used in the SQLite provider (SltGeomUtils.cpp, function Fgf2Wkb).

The downside is, you would have to port it to C#, since it's written in C++. The upside is that it is likely the fastest method.

Traian


-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of maland
Sent: Monday, December 20, 2010 9:22 AM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] Fgf to Wkb


Hello,

What is the correct/fastest way to convert from Fgf to Wkb?
I am using the FDO from .Net. 

Currently I'm doing it this way:

byte[] fgfBytes = reader.GetGeometry(p.Name);
using (FgfGeometryFactory gf = new FgfGeometryFactory())
{
  using(IGeometry geom = gf.CreateGeometryFromFgf(fgfBytes))
  {
    byte[] wkbBytes = gf.GetWkb(geom);
    // Do some stuff with the WKB array
  }
}

For some rather large MultiLineString geometries this takes incredibly long
time, specially the GetWkb function. E.g. one geometry concisting of 1500 kB
data takes about 10 seconds. (I have a rather fast computer...)

Is this the correct way to create a Wkb from Fgf?

Regards
Henning Maeland
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Fgf-to-Wkb-tp5850828p5850828.html
Sent from the FDO Users mailing list archive at Nabble.com.
_______________________________________________
fdo-users mailing list
fdo-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users


More information about the fdo-users mailing list