[fdo-users] FDO 3.1 vs 3.2

George McLean gmclean at gorge.net
Fri Dec 28 17:21:21 EST 2007


I am finally getting around to updating a .NET application to run in Map 
2008 so I am running into some issues using the FDO 3.2 libraries. In 
the code below I am using the MySQL provider to insert point objects 
into a MySQL database. I get an error "Unsupported Geometry Type" for 
all my points using the following code.

        ' Load the geometry object
        Dim d(3) As Double
        d(0) = BlRef.Position.X
        d(1) = BlRef.Position.Y
        d(2) = BlRef.Position.Z
        Dim geoPoint As OSGeo.FDO.Geometry.IPoint
        geoPoint = gf.CreatePoint(3, d)
        Dim byteArray() As Byte
        byteArray = gf.GetFgf(geoPoint) ' gf.GetAgf(geoPoint)
        fdoGeoData = New OSGeo.FDO.Expression.GeometryValue(byteArray)
        fdoPropertyValue = New 
OSGeo.FDO.Commands.PropertyValue("geometry", fdoGeoData)
        fdoValueCollectionIndex = fdoPropertyValues.Add(fdoPropertyValue)
        ' Insert into FDO
        Dim fdoFeatureReader As osgeo.Fdo.Commands.Feature.IFeatureReader

            fdoFeatureReader = fdoInsertObject.Execute()

This code was working fine using the appropriate FDO 3.1 libraries. I 
have similar code for loading LineString features that also fails in 
3.2. Any suggestions on how to debug this?


George McLean

More information about the fdo-users mailing list