Exemplo n.º 1
0
        /// <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));
        }
Exemplo n.º 2
0
 /// <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;
 }
Exemplo n.º 3
0
 /// <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;
 }
Exemplo n.º 4
0
 /// <summary></summary>
 public IEnumerable <Chunk> ParseFile(string filename, ImportConfig config) => f_parseFile(filename, config);
Exemplo n.º 5
0
 /// <summary></summary>
 public PointFileInfo ParseFileInfo(string filename, ImportConfig config) => f_parseFileInfo(filename, config);
Exemplo n.º 6
0
 /// <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)
            );
 }