/// <summary> /// Parses ASCII lines file. /// </summary> internal static IEnumerable <Chunk> AsciiLines(Func <byte[], int, double, Chunk?> lineParser, string filename, ImportConfig config ) { var fileSizeInBytes = new FileInfo(filename).Length; var stream = File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.Read); return(AsciiLines(lineParser, stream, fileSizeInBytes, config)); }
/// <summary></summary> public ImportConfig(ImportConfig x) { Key = x.Key; NormalizePointDensityGlobal = x.NormalizePointDensityGlobal; OctreeSplitLimit = x.OctreeSplitLimit; ProgressCallback = x.ProgressCallback; ParseConfig = x.ParseConfig; Reproject = x.Reproject; Storage = x.Storage; }
/// <summary></summary> public ImportConfig(ImportConfig x) { CancellationToken = x.CancellationToken; CreateOctreeLod = x.CreateOctreeLod; Key = x.Key; MaxDegreeOfParallelism = x.MaxDegreeOfParallelism; MinDist = x.MinDist; DeduplicateChunks = x.DeduplicateChunks; OctreeSplitLimit = x.OctreeSplitLimit; ProgressCallback = x.ProgressCallback; ReadBufferSizeInBytes = x.ReadBufferSizeInBytes; MaxChunkPointCount = x.MaxChunkPointCount; Reproject = x.Reproject; EstimateNormals = x.EstimateNormals; Storage = x.Storage; Verbose = x.Verbose; }
/// <summary></summary> public IEnumerable <Chunk> ParseFile(string filename, ImportConfig config) => f_parseFile(filename, config);
/// <summary></summary> public PointFileInfo ParseFileInfo(string filename, ImportConfig config) => f_parseFileInfo(filename, config);
/// <summary> /// Parses ASCII lines stream. /// </summary> internal static IEnumerable <Chunk> AsciiLines(Func <byte[], int, double, Chunk?> lineParser, Stream stream, long streamLengthInBytes, ImportConfig config ) { // importing file return(stream .ChunkStreamAtNewlines(streamLengthInBytes, config.ReadBufferSizeInBytes, config.CancellationToken) .ParseBuffers(streamLengthInBytes, lineParser, config.MinDist, config.MaxDegreeOfParallelism, config.Verbose, config.CancellationToken) ); }