[fdo-users] Insert new feature object on SHP File
Matteo
matteo.conte1979 at libero.it
Sun Nov 1 15:13:33 EST 2009
Hi all,
I'm new on FDO. I try to insert a new feature object on a shp file with
VB.NET but i get this error "The type of geometry ( 'PolyLineM')
geographical entity creates a conflict with the type of shape file (
'Polyline')."
This is the code:
Dim objCmdI As Commands.Feature.IInsert =
objConn.CreateCommand(Commands.CommandType.CommandType_Insert)
objCmdI.SetFeatureClassName(objClass.Name)
Dim objPropsValues As Commands.PropertyValueCollection =
objCmdI.PropertyValues()
Dim objPropV As Commands.PropertyValue = New
Commands.PropertyValue()
objPropV.SetName("ID")
objPropV.Value = New OSGeo.FDO.Expression.Int32Value(2)
objPropsValues.Add(objPropV)
objPropV = New Commands.PropertyValue()
objPropV.SetName("Geometry")
Dim objGeomV As Geometry.FgfGeometryFactory = New
Geometry.FgfGeometryFactory()
Dim objCoords(5) As Double
objCoords(0) = 0
objCoords(1) = 0
objCoords(2) = 10
objCoords(3) = 10
objCoords(4) = 50
objCoords(5) = 20
Dim objLine As Geometry.ILineString = objGeomV.CreateLineString(2,
3, objCoords)
objPropV.Value = New
OSGeo.FDO.Expression.GeometryValue(objGeomV.GetFgf(objLine))
objPropsValues.Add(objPropV)
objCmdI.Execute()
objConn.Flush()
Can you help me?
Regards,
Matteo
--
View this message in context: http://n2.nabble.com/Insert-new-feature-object-on-SHP-File-tp3928348p3928348.html
Sent from the FDO Users mailing list archive at Nabble.com.
More information about the fdo-users
mailing list