本文整理汇总了C++中LASreader::get_stream方法的典型用法代码示例。如果您正苦于以下问题:C++ LASreader::get_stream方法的具体用法?C++ LASreader::get_stream怎么用?C++ LASreader::get_stream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LASreader
的用法示例。
在下文中一共展示了LASreader::get_stream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
while (lasreader->read_point())
{
if (memcmp(point10, &lasreader->point, 20) == 0)
{
break;
}
laswriter->write_point(&lasreader->point);
laswriter->update_inventory(&lasreader->point);
}
}
else
{
while (lasreader->read_point())
{
laswriter->write_point(&lasreader->point);
laswriter->update_inventory(&lasreader->point);
}
}
}
laswriter->update_header(&lasreader->header, TRUE);
}
}
I64 total_bytes = laswriter->close();
delete laswriter;
#ifdef _WIN32
if (verbose) fprintf(stderr,"%g secs to write %I64d bytes for '%s' with %I64d points of type %d\n", taketime()-start_time, total_bytes, laswriteopener.get_file_name(), lasreader->p_count, lasreader->header.point_data_format);
#else
if (verbose) fprintf(stderr,"%g secs to write %lld bytes for '%s' with %lld points of type %d\n", taketime()-start_time, total_bytes, laswriteopener.get_file_name(), lasreader->p_count, lasreader->header.point_data_format);
#endif
if (start_of_waveform_data_packet_record && !waveform)
{
lasreader->close(FALSE);
ByteStreamIn* stream = lasreader->get_stream();
stream->seek(start_of_waveform_data_packet_record);
char* wave_form_file_name;
if (laswriteopener.get_file_name())
{
wave_form_file_name = strdup(laswriteopener.get_file_name());
int len = strlen(wave_form_file_name);
if (wave_form_file_name[len-3] == 'L')
{
wave_form_file_name[len-3] = 'W';
wave_form_file_name[len-2] = 'D';
wave_form_file_name[len-1] = 'P';
}
else
{
wave_form_file_name[len-3] = 'w';
wave_form_file_name[len-2] = 'd';
wave_form_file_name[len-1] = 'p';
}
}
else
{
wave_form_file_name = strdup("wave_form.wdp");
}
FILE* file = fopen(wave_form_file_name, "wb");
if (file)
{
if (verbose) fprintf(stderr,"writing waveforms to '%s'\n", wave_form_file_name);
try
{
int byte;
while (true)
{
byte = stream->getByte();
fputc(byte, file);
}
}
catch (...)
{
fclose(file);
}
}
}
laswriteopener.set_file_name(0);
}
lasreader->close();
delete lasreader;
}
if (projection_was_set)
{
free(geo_keys);
if (geo_double_params)
{
free(geo_double_params);
}
}
byebye(false, argc==1);
return 0;
}