public class DataCompiler extends Object
构造器和说明 |
---|
DataCompiler()
构造路网数据编译类的对象。
|
限定符和类型 | 方法和说明 |
---|---|
void |
addSteppedListener(SteppedListener l)
添加一个进度条事件(
SteppedEvent )的监听器。 |
boolean |
compileSSCData(SSCCompilerParameter parameter)
已过时。
此方法已废弃,请使用支持进度监听的新方法
DataCompiler.compileSSCData(SSCCompilerParameter, SteppedListener...) 替换。
|
boolean |
compileSSCData(SSCCompilerParameter parameter,
SteppedListener... listener)
将网络数据编译为包含捷径信息的SSC文件。
|
void |
removeSteppedListener(SteppedListener l)
移除一个进度条事件(
SteppedEvent )的监听器。 |
@Deprecated public boolean compileSSCData(SSCCompilerParameter parameter)
DataCompiler.compileSSCData(SSCCompilerParameter, SteppedListener...)
替换。
parameter
- SSC文件编译参数类。public void CompileSSCData(SSCCompilerParameter parameter) { SSCCompilerParameter setting = new SSCCompilerParameter(); // 设置网络基本信息字段 setting.setNetworkDataset(network); // network为待分析的网络数据集 setting.setEdgeIDField("SmEdgeID"); setting.setNodeIDField("SmNodeID"); setting.setFNodeIDField("SmFNode"); setting.setTNodeIDField("SmTNode"); setting.setWeightField("SmLength"); // 设置交通规则字段 setting.setRuleField("Direction"); setting.setFTSingleWayRuleValues(new java.lang.String[] { "2" }); setting.setTFSingleWayRuleValues(new java.lang.String[] { "3" }); // 设置禁行转向表信息 setting.setTurnDataset(datasetTurn);// datasetTurn为转向表 setting.setTurnFEdgeIDField("FEdgeID"); setting.setTurnNodeIDField("NodeID"); setting.setTurnTEdgeIDField("TEdgeID"); // 设置SSC文件路径 String filePath = "../test.ssc"; setting.setFilePath(filePath); // 生成SSC文件 DataCompiler compiler = new DataCompiler(); boolean b = compiler.compileSSCData(setting); TestAssert.assertTrue("compileSSCData is true", b); }
public boolean compileSSCData(SSCCompilerParameter parameter, SteppedListener... listener)
parameter
- SSC文件编译参数类。listener
- 监听实例对象。public void CompileSSCData(SSCCompilerParameter parameter) { SSCCompilerParameter setting = new SSCCompilerParameter(); // 设置网络基本信息字段 setting.setNetworkDataset(network); // network为待分析的网络数据集 setting.setEdgeIDField("SmEdgeID"); setting.setNodeIDField("SmNodeID"); setting.setFNodeIDField("SmFNode"); setting.setTNodeIDField("SmTNode"); setting.setWeightField("SmLength"); // 设置交通规则字段 setting.setRuleField("Direction"); setting.setFTSingleWayRuleValues(new java.lang.String[] { "2" }); setting.setTFSingleWayRuleValues(new java.lang.String[] { "3" }); // 设置禁行转向表信息 setting.setTurnDataset(datasetTurn);// datasetTurn为转向表 setting.setTurnFEdgeIDField("FEdgeID"); setting.setTurnNodeIDField("NodeID"); setting.setTurnTEdgeIDField("TEdgeID"); // 设置SSC文件路径 String filePath = "../test.ssc"; setting.setFilePath(filePath); // 生成SSC文件 DataCompiler compiler = new DataCompiler(); boolean b = compiler.compileSSCData(setting,null); TestAssert.assertTrue("compileSSCData is true", b); }
public void addSteppedListener(SteppedListener l)
SteppedEvent
)的监听器。l
- 一个用于接收进度条事件的监听器。public void removeSteppedListener(SteppedListener l)
SteppedEvent
)的监听器。l
- 一个用于接收进度条事件的监听器。Copyright © 2021–2024 SuperMap. All rights reserved.