C# SDO_GEOMETRY

OracleParameter endGeometry = cmd.CreateParameter();
endGeometry.OracleDbType = OracleDbType.Object;
endGeometry.UdtTypeName = "MDSYS.SDO_GEOMETRY";
endGeometry.Value = routeSegment.endPointGeometry;
endGeometry.ParameterName = "P_END_GEOM";    

parameter.Add(endGeometry);   
 cmd = new OracleCommand()
    cmd.Connection = con;
    cmd.CommandType = CommandType.Text;
    cmd.CommandText = "insert into SHAPE_SDO (CMS,POLY) values (:CMS,:POLY)";
    cmd.Parameters.Clear();
    cmd.ArrayBindCount = allRecord.Count;

    cmd.Parameters.Add(":CMS", OracleDbType.Varchar2, CMS.ToArray(), ParameterDirection.Input);

    OracleParameter oracle_SDO_Param = new OracleParameter();
            oracle_SDO_Param.OracleDbType = OracleDbType.Object;
            oracle_SDO_Param.UdtTypeName = "MDSYS.SDO_GEOMETRY";
            oracle_SDO_Param.ParameterName = "POLY";
            oracle_SDO_Param.Value = POLY.ToArray();
            cmd.Parameters.Add(oracle_SDO_Param);
posted @ 2019-04-19 23:40  googlegis  阅读(344)  评论(0编辑  收藏  举报

坐标合肥,非典型GIS开发人员 GitHub