[fdo-users] FDO 3.1 vs 3.2

George McLean gmclean at gorge.net
Wed Jan 2 14:17:58 EST 2008


I just thought I would follow up with a fix for the unsupported geometry 
type error I was getting. This may already be well known but I thought 
someone might benefit from my experience. From what I can tell osgeo.fdo 
geometry types do not support Z or M in the definition of the geometry. 
I changed the dimensionality in the call to gf.CreatePoint from 2 which 
gave me XYZM to 0 which gave me XY. This also worked with the call to 
CreateLineString.

George


George McLean wrote:
> Hello,
>
> 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
>        Try
>
>            fdoFeatureReader = fdoInsertObject.Execute()
>            fdoTrans.Commit()
>            fdoFeatureReader.Dispose()
>
>
> 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?
>
> Thanks
>
> George McLean
> _______________________________________________
> 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