将网络数据编译为包含捷径信息的SSC文件。

命名空间:  SuperMap.Analyst.NetworkAnalyst
程序集:  SuperMap.Analyst.NetworkAnalyst (in SuperMap.Analyst.NetworkAnalyst)
版本: dll

语法

C#
public bool CompileSSCData(
	SSCCompilerParameter setting
)

参数

setting
Type: SuperMap.Analyst.NetworkAnalyst..::.SSCCompilerParameter
指定的SSC文件编译参数类。

返回值

是否成功,如果成功返回 true,否则返回 false。

示例

以下代码示例如何设置参数生成SSC文件。

CopyC#
public void CompileSSCData(SSCCompilerParameter parameter)
{
    SSCCompilerParameter setting = new SSCCompilerParameter();

    //设置网络基本信息字段
    setting.NetworkDataset = networkDataset;
    setting.EdgeIDField = "SmEdgeID";
    setting.NodeIDField = "SmNodeID";
    setting.FNodeIDField = "SmFNode";
    setting.TNodeIDField = "SmTNode";
    setting.WeightField = "SmLength";

    //设置交通规则字段
    setting.RuleField = "Direction";
    setting.FTSingleWayRuleValues = new String[] { "2" };
    setting.TFSingleWayRuleValues = new String[] { "3" };

    //设置禁行转向表信息
    setting.TurnDataset = datasetTurn;
    setting.TurnFEdgeIDField = "FEdgeID";
    setting.TurnNodeIDField = "NodeID";
    setting.TurnTEdgeIDField = "TEdgeID";

    //设置SSC文件路径
    String filePath = "../test.ssc";
    setting.FilePath = filePath;

    //生成SSC文件
    DataCompiler compiler = new DataCompiler();
    bool b = compiler.CompileSSCData(setting);
    Assert.IsTrue( b, "compileSSCData is true");
}

版本信息

SuperMap iObjects .NET


请参见