本文整理汇总了C#中Options.add方法的典型用法代码示例。如果您正苦于以下问题:C# Options.add方法的具体用法?C# Options.add怎么用?C# Options.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Options
的用法示例。
在下文中一共展示了Options.add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test1
private void Test1()
{
Console.WriteLine("Starting LasWriter test1");
{
// create the reader
Options readerOpts = new Options();
Option readerOpt1 = new Option();
readerOpt1.setValue_String("../../test/data/1.2-with-color.las");
readerOpt1.setName("filename");
readerOpts.add(readerOpt1);
LasReader reader = new LasReader(readerOpts);
Options writerOpts = new Options();
Option writerOpt1 = new Option();
writerOpt1.setValue_String("foo.laz");
writerOpt1.setName("filename");
writerOpts.add(writerOpt1);
LasWriter writer = new LasWriter(reader, writerOpts);
writer.initialize();
writer.setCompressed(true);
writer.setDate(0, 0);
writer.setPointFormat(PointFormat.PointFormat3);
writer.setSystemIdentifier("");
writer.setGeneratingSoftware("TerraScan");
// how many points do we have?
ulong numPoints = reader.getNumPoints();
Debug.Assert(numPoints == 1065);
ulong numWritten = writer.write(numPoints);
Debug.Assert(numWritten == 1065);
}
Console.WriteLine("checking output...");
{
Options opts = new Options();
Option opt = new Option();
opt.setValue_String("foo.laz");
opt.setName("filename");
opts.add(opt);
LasReader reader = new LasReader(opts);
reader.initialize();
Debug.Assert(reader.isCompressed() == true);
ulong numPoints = reader.getNumPoints();
Debug.Assert(numPoints == 1065);
}
Console.WriteLine("done!");
return;
}