本文整理汇总了C++中LASreadOpener::get_file_name_number方法的典型用法代码示例。如果您正苦于以下问题:C++ LASreadOpener::get_file_name_number方法的具体用法?C++ LASreadOpener::get_file_name_number怎么用?C++ LASreadOpener::get_file_name_number使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LASreadOpener
的用法示例。
在下文中一共展示了LASreadOpener::get_file_name_number方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
minimum_points = atoi(argv[i]);
}
else if (strcmp(argv[i],"-threshold") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: value\n", argv[i]);
byebye(true);
}
i++;
threshold = atoi(argv[i]);
}
else if (strcmp(argv[i],"-append") == 0)
{
append = TRUE;
}
else
{
fprintf(stderr, "ERROR: cannot understand argument '%s'\n", argv[i]);
byebye(true);
}
}
#ifdef COMPILE_WITH_GUI
if (gui)
{
return lasindex_gui(argc, argv, &lasreadopener);
}
#endif
#ifdef COMPILE_WITH_MULTI_CORE
if (cores > 1)
{
if (lasreadopener.get_file_name_number() < 2)
{
fprintf(stderr,"WARNING: only %u input files. ignoring '-cores %d' ...\n", lasreadopener.get_file_name_number(), cores);
}
else if (lasreadopener.is_merged())
{
fprintf(stderr,"WARNING: input files merged on-the-fly. ignoring '-cores %d' ...\n", cores);
}
else
{
return lasindex_multi_core(argc, argv, &lasreadopener, cores);
}
}
#endif
// check input
if (!lasreadopener.active())
{
fprintf(stderr,"ERROR: no input specified\n");
byebye(true, argc==1);
}
/*
// lasquadtree test
LASquadtree quadtree;
quadtree.setup(0, 99, 0, 99, 10);
quadtree.intersect_rectangle(10, 10, 20, 20);
quadtree.get_intersected_cells();
while (quadtree.has_intersected_cells())
{
F32 min[2],max[2];
示例2: main
//.........这里部分代码省略.........
}
else if (strcmp(argv[i],"-gps") == 0)
{
report_gps = true;
}
else if (strcmp(argv[i],"-rgb") == 0)
{
report_rgb = true;
}
else if (strcmp(argv[i],"-number") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: max\n", argv[i]);
byebye(true);
}
i++;
array_max = atoi(argv[i]);
}
else if (strcmp(argv[i],"-lines") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: number\n", argv[i]);
byebye(true);
}
i++;
report_lines = atoi(argv[i]);
}
else if (strcmp(argv[i],"-all") == 0)
{
array_max = U32_MAX;
}
else if ((argv[i][0] != '-') && (lasreadopener.get_file_name_number() == 0))
{
lasreadopener.add_file_name(argv[i]);
argv[i][0] = '\0';
}
else
{
fprintf(stderr, "ERROR: cannot understand argument '%s'\n", argv[i]);
byebye(true);
}
}
#ifdef COMPILE_WITH_GUI
if (gui)
{
return lasprecision_gui(argc, argv, &lasreadopener);
}
#endif
#ifdef COMPILE_WITH_MULTI_CORE
if ((cores > 1) && (lasreadopener.get_file_name_number() > 1) && (!lasreadopener.is_merged()))
{
return lasprecision_multi_core(argc, argv, &geoprojectionconverter, &lasreadopener, &laswriteopener, cores);
}
#endif
// check input
if (!lasreadopener.active())
{
fprintf(stderr, "ERROR: no input specified\n");
byebye(true, argc==1);
}
示例3: main
int main(int argc, char *argv[])
{
int i;
#ifdef COMPILE_WITH_GUI
bool gui = false;
#endif
bool verbose = false;
bool keep_lastiling = false;
U32 chopchop = 0;
bool projection_was_set = false;
double start_time = 0;
LASreadOpener lasreadopener;
GeoProjectionConverter geoprojectionconverter;
LASwriteOpener laswriteopener;
if (argc == 1)
{
#ifdef COMPILE_WITH_GUI
return lasmerge_gui(argc, argv, 0);
#else
fprintf(stderr,"%s is better run in the command line\n", argv[0]);
char file_name[256];
fprintf(stderr,"enter input file 1: ");
fgets(file_name, 256, stdin);
file_name[strlen(file_name)-1] = '\0';
lasreadopener.add_file_name(file_name);
fprintf(stderr,"enter input file 2: ");
fgets(file_name, 256, stdin);
file_name[strlen(file_name)-1] = '\0';
lasreadopener.add_file_name(file_name);
fprintf(stderr,"enter output file: ");
fgets(file_name, 256, stdin);
file_name[strlen(file_name)-1] = '\0';
laswriteopener.set_file_name(file_name);
#endif
}
else
{
for (i = 1; i < argc; i++)
{
if (argv[i][0] == '–') argv[i][0] = '-';
}
if (!geoprojectionconverter.parse(argc, argv)) byebye(true);
if (!lasreadopener.parse(argc, argv)) byebye(true);
if (!laswriteopener.parse(argc, argv)) byebye(true);
}
for (i = 1; i < argc; i++)
{
if (argv[i][0] == '\0')
{
continue;
}
else if (strcmp(argv[i],"-h") == 0 || strcmp(argv[i],"-help") == 0)
{
fprintf(stderr, "LAStools (by [email protected]) version %d\n", LAS_TOOLS_VERSION);
usage();
}
else if (strcmp(argv[i],"-v") == 0 || strcmp(argv[i],"-verbose") == 0)
{
verbose = true;
}
else if (strcmp(argv[i],"-version") == 0)
{
fprintf(stderr, "LAStools (by [email protected]) version %d\n", LAS_TOOLS_VERSION);
byebye();
}
else if (strcmp(argv[i],"-gui") == 0)
{
#ifdef COMPILE_WITH_GUI
gui = true;
#else
fprintf(stderr, "WARNING: not compiled with GUI support. ignoring '-gui' ...\n");
#endif
}
else if (strcmp(argv[i],"-split") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: size\n", argv[i]);
byebye(true);
}
i++;
chopchop = atoi(argv[i]);
}
else if (strcmp(argv[i],"-keep_lastiling") == 0)
{
keep_lastiling = true;
}
else if ((argv[i][0] != '-') && (lasreadopener.get_file_name_number() == 0))
{
lasreadopener.add_file_name(argv[i]);
argv[i][0] = '\0';
}
else
{
fprintf(stderr, "ERROR: cannot understand argument '%s'\n", argv[i]);
byebye(true);
}
//.........这里部分代码省略.........
示例4: main
int main(int argc, char *argv[])
{
int i,j;
#ifdef COMPILE_WITH_GUI
bool gui = false;
#endif
bool verbose = false;
int shutup = 5;
int random_seeks = 0;
double start_time = 0.0;
LASreadOpener lasreadopener;
LASwriteOpener laswriteopener;
if (argc == 1)
{
#ifdef COMPILE_WITH_GUI
return lasdiff_gui(argc, argv, 0);
#else
char file_name[256];
fprintf(stderr,"lasdiff.exe is better run in the command line\n");
fprintf(stderr,"enter input file1: "); fgets(file_name, 256, stdin);
file_name[strlen(file_name)-1] = '\0';
lasreadopener.set_file_name(file_name);
fprintf(stderr,"enter input file2: "); fgets(file_name, 256, stdin);
file_name[strlen(file_name)-1] = '\0';
lasreadopener.set_file_name(file_name);
#endif
}
else
{
for (i = 1; i < argc; i++)
{
if (argv[i][0] == '–') argv[i][0] = '-';
}
if (!lasreadopener.parse(argc, argv)) byebye(true);
if (!laswriteopener.parse(argc, argv)) byebye(true);
}
for (i = 1; i < argc; i++)
{
if (argv[i][0] == '\0')
{
continue;
}
else if (strcmp(argv[i],"-h") == 0 || strcmp(argv[i],"-help") == 0)
{
fprintf(stderr, "LAStools (by [email protected]) version %d\n", LAS_TOOLS_VERSION);
usage();
}
else if (strcmp(argv[i],"-v") == 0 || strcmp(argv[i],"-verbose") == 0)
{
verbose = true;
}
else if (strcmp(argv[i],"-version") == 0)
{
fprintf(stderr, "LAStools (by [email protected]) version %d\n", LAS_TOOLS_VERSION);
byebye();
}
else if (strcmp(argv[i],"-gui") == 0)
{
#ifdef COMPILE_WITH_GUI
gui = true;
#else
fprintf(stderr, "WARNING: not compiled with GUI support. ignoring '-gui' ...\n");
#endif
}
else if (strcmp(argv[i],"-random_seeks") == 0)
{
random_seeks = 10;
}
else if (strcmp(argv[i],"-shutup") == 0)
{
i++;
shutup = atoi(argv[i]);;
}
else if ((argv[i][0] != '-') && (lasreadopener.get_file_name_number() == 0))
{
lasreadopener.add_file_name(argv[i]);
argv[i][0] = '\0';
}
else
{
fprintf(stderr, "ERROR: cannot understand argument '%s'\n", argv[i]);
byebye(true);
}
}
#ifdef COMPILE_WITH_GUI
if (gui)
{
return lasdiff_gui(argc, argv, &lasreadopener);
}
#endif
if (!lasreadopener.active())
{
fprintf (stderr, "ERROR: no input specified\n");
byebye(true, argc==1);
}
//.........这里部分代码省略.........
示例5: main
//.........这里部分代码省略.........
{
header_comment_sign = ',';
}
else if (strcmp(argv[i],"colon") == 0)
{
header_comment_sign = ':';
}
else if (strcmp(argv[i],"scolon") == 0 || strcmp(argv[i],"semicolon") == 0)
{
header_comment_sign = ';';
}
else if (strcmp(argv[i],"pound") == 0 || strcmp(argv[i],"hash") == 0)
{
header_comment_sign = '#';
}
else if (strcmp(argv[i],"percent") == 0)
{
header_comment_sign = '%';
}
else if (strcmp(argv[i],"dollar") == 0)
{
header_comment_sign = '$';
}
else if (strcmp(argv[i],"star") == 0)
{
header_comment_sign = '*';
}
else
{
fprintf(stderr, "ERROR: unknown header comment symbol '%s'\n",argv[i]);
usage(true);
}
}
else if ((argv[i][0] != '-') && (lasreadopener.get_file_name_number() == 0))
{
lasreadopener.add_file_name(argv[i]);
argv[i][0] = '\0';
}
else
{
fprintf(stderr, "ERROR: cannot understand argument '%s'\n", argv[i]);
usage(true);
}
}
#ifdef COMPILE_WITH_GUI
if (gui)
{
return las2txt_gui(argc, argv, &lasreadopener);
}
#endif
#ifdef COMPILE_WITH_MULTI_CORE
if ((cores > 1) && (lasreadopener.get_file_name_number() > 1) && (!lasreadopener.is_merged()))
{
return las2txt_multi_core(argc, argv, &lasreadopener, &laswriteopener, cores);
}
#endif
// check input
if (!lasreadopener.active())
{
fprintf(stderr,"ERROR: no input specified\n");
byebye(true, argc == 1);
}
示例6: main
//.........这里部分代码省略.........
usage(true);
}
i++;
set_system_identifier = argv[i];
}
else if (strcmp(argv[i],"-set_generating_software") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: name\n", argv[i]);
usage(true);
}
i++;
set_generating_software = argv[i];
}
else if (strcmp(argv[i],"-set_ogc_wkt") == 0)
{
set_ogc_wkt = true;
}
else if (strcmp(argv[i],"-set_version") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: major.minor\n", argv[i]);
usage(true);
}
i++;
if (sscanf(argv[i],"%d.%d",&set_version_major,&set_version_minor) != 2)
{
fprintf(stderr, "ERROR: cannot understand argument '%s' of '%s'\n", argv[i], argv[i-1]);
usage(true);
}
}
else if ((argv[i][0] != '-') && (lasreadopener.get_file_name_number() == 0))
{
lasreadopener.add_file_name(argv[i]);
argv[i][0] = '\0';
}
else
{
fprintf(stderr, "ERROR: cannot understand argument '%s'\n", argv[i]);
usage(true);
}
}
#ifdef COMPILE_WITH_GUI
if (gui)
{
return txt2las_gui(argc, argv, &lasreadopener);
}
#endif
#ifdef COMPILE_WITH_MULTI_CORE
if (cores > 1)
{
if (lasreadopener.get_file_name_number() < 2)
{
fprintf(stderr,"WARNING: only %u input files. ignoring '-cores %d' ...\n", lasreadopener.get_file_name_number(), cores);
}
else if (lasreadopener.is_merged())
{
fprintf(stderr,"WARNING: input files merged on-the-fly. ignoring '-cores %d' ...\n", cores);
}
else
{
return txt2las_multi_core(argc, argv, &geoprojectionconverter, &lasreadopener, &laswriteopener, cores);
示例7: main
int main(int argc, char *argv[])
{
MPI_Init(&argc, &argv);
int i;
#ifdef COMPILE_WITH_GUI
bool gui = false;
#endif
bool verbose = false;
bool keep_lastiling = false;
U32 chopchop = 0;
bool projection_was_set = false;
double start_time = 0;
LASreadOpener lasreadopener;
GeoProjectionConverter geoprojectionconverter;
LASwriteOpener laswriteopener;
if (argc == 1)
{
#ifdef COMPILE_WITH_GUI
return lasmerge_gui(argc, argv, 0);
#else
fprintf(stderr,"%s is better run in the command line\n", argv[0]);
char file_name[256];
fprintf(stderr,"enter input file 1: "); fgets(file_name, 256, stdin);
file_name[strlen(file_name)-1] = '\0';
lasreadopener.add_file_name(file_name);
fprintf(stderr,"enter input file 2: "); fgets(file_name, 256, stdin);
file_name[strlen(file_name)-1] = '\0';
lasreadopener.add_file_name(file_name);
fprintf(stderr,"enter output file: "); fgets(file_name, 256, stdin);
file_name[strlen(file_name)-1] = '\0';
laswriteopener.set_file_name(file_name);
#endif
}
else
{
for (i = 1; i < argc; i++)
{
if (argv[i][0] == '�') argv[i][0] = '-';
}
if (!geoprojectionconverter.parse(argc, argv)) byebye(true);
if (!lasreadopener.parse(argc, argv)) byebye(true);
if (lasreadopener.get_file_name_number()<2)
{
fprintf(stderr,"Must specify more than one input file.\n");
byebye(true); // only support merging more than one file
}
if (!laswriteopener.parse(argc, argv)) byebye(true);
}
for (i = 1; i < argc; i++)
{
if (argv[i][0] == '\0')
{
continue;
}
else if (strcmp(argv[i],"-h") == 0 || strcmp(argv[i],"-help") == 0)
{
fprintf(stderr, "LAStools (by [email protected]) version %d\n", LAS_TOOLS_VERSION);
usage();
}
else if (strcmp(argv[i],"-v") == 0 || strcmp(argv[i],"-verbose") == 0)
{
verbose = true;
}
else if (strcmp(argv[i],"-version") == 0)
{
fprintf(stderr, "LAStools (by [email protected]) version %d\n", LAS_TOOLS_VERSION);
byebye();
}
else if (strcmp(argv[i],"-gui") == 0)
{
#ifdef COMPILE_WITH_GUI
gui = true;
#else
fprintf(stderr, "WARNING: not compiled with GUI support. ignoring '-gui' ...\n");
#endif
}
else if (strcmp(argv[i],"-split") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: size\n", argv[i]);
byebye(true);
}
i++;
chopchop = atoi(argv[i]);
}
else if (strcmp(argv[i],"-keep_lastiling") == 0)
{
keep_lastiling = true;
}
else if ((argv[i][0] != '-') && (lasreadopener.get_file_name_number() == 0))
{
lasreadopener.add_file_name(argv[i]);
argv[i][0] = '\0';
}
//.........这里部分代码省略.........
示例8: main
//.........这里部分代码省略.........
else if (strcmp(argv[i],"-minimum") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: number\n", argv[i]);
usage(true);
}
i++;
minimum_points = atoi(argv[i]);
}
else if (strcmp(argv[i],"-threshold") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: value\n", argv[i]);
usage(true);
}
i++;
threshold = atoi(argv[i]);
}
else if (strcmp(argv[i],"-size") == 0)
{
report_file_size = true;
}
else if (strcmp(argv[i],"-waveform") == 0 || strcmp(argv[i],"-waveforms") == 0)
{
waveform = true;
}
else if (strcmp(argv[i],"-waveform_with_map") == 0 || strcmp(argv[i],"-waveforms_with_map") == 0)
{
waveform = true;
waveform_with_map = true;
}
else if ((argv[i][0] != '-') && (lasreadopener.get_file_name_number() == 0))
{
lasreadopener.add_file_name(argv[i]);
argv[i][0] = '\0';
}
else
{
fprintf(stderr, "ERROR: cannot understand argument '%s'\n", argv[i]);
usage(true);
}
}
#ifdef COMPILE_WITH_GUI
if (gui)
{
return laszip_gui(argc, argv, &lasreadopener);
}
#endif
#ifdef COMPILE_WITH_MULTI_CORE
if ((cores > 1) && (lasreadopener.get_file_name_number() > 1) && (!lasreadopener.get_merged()))
{
return laszip_multi_core(argc, argv, &geoprojectionconverter, &lasreadopener, &laswriteopener, cores);
}
#endif
// check input
if (!lasreadopener.active())
{
fprintf(stderr,"ERROR: no input specified\n");
usage(true, argc==1);
}
示例9: main
//.........这里部分代码省略.........
{
remove_tiling_vlr = true;
i++;
}
else if (strcmp(argv[i],"-remove_original_vlr") == 0)
{
remove_original_vlr = true;
i++;
}
else if (strcmp(argv[i],"-set_point_type") == 0 || strcmp(argv[i],"-set_point_data_format") == 0 || strcmp(argv[i],"-point_type") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: type\n", argv[i]);
byebye(true);
}
set_point_data_format = atoi(argv[i+1]);
i++;
}
else if (strcmp(argv[i],"-set_point_data_record_length") == 0 || strcmp(argv[i],"-set_point_size") == 0 || strcmp(argv[i],"-point_size") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: size\n", argv[i]);
byebye(true);
}
set_point_data_record_length = atoi(argv[i+1]);
i++;
}
else if (strcmp(argv[i],"-clip_to_bounding_box") == 0 || strcmp(argv[i],"-clip_to_bb") == 0)
{
clip_to_bounding_box = true;
}
else if ((argv[i][0] != '-') && (lasreadopener.get_file_name_number() == 0))
{
lasreadopener.add_file_name(argv[i]);
argv[i][0] = '\0';
}
else
{
fprintf(stderr, "ERROR: cannot understand argument '%s'\n", argv[i]);
usage(true);
}
}
// check input
if (!lasreadopener.active())
{
fprintf(stderr,"ERROR: no input specified\n");
usage(true, argc==1);
}
BOOL extra_pass = laswriteopener.is_piped();
// for piped output we need an extra pass
if (extra_pass)
{
if (lasreadopener.is_piped())
{
fprintf(stderr, "ERROR: input and output cannot both be piped\n");
usage(true);
}
示例10: main
//.........这里部分代码省略.........
{
remove_tiling_vlr = true;
i++;
}
else if (strcmp(argv[i],"-remove_original_vlr") == 0)
{
remove_original_vlr = true;
i++;
}
else if (strcmp(argv[i],"-point_type") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: type\n", argv[i]);
byebye(true);
}
set_point_data_format = atoi(argv[i+1]);
i++;
}
else if (strcmp(argv[i],"-point_size") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: size\n", argv[i]);
byebye(true);
}
set_point_data_record_length = atoi(argv[i+1]);
i++;
}
else if (strcmp(argv[i],"-clip_to_bounding_box") == 0 || strcmp(argv[i],"-clip_to_bbox") == 0)
{
clip_to_bounding_box = true;
}
else if ((argv[i][0] != '-') && (lasreadopener.get_file_name_number() == 0))
{
lasreadopener.add_file_name(argv[i]);
argv[i][0] = '\0';
}
else
{
fprintf(stderr, "ERROR: cannot understand argument '%s'\n", argv[i]);
usage(true);
}
}
#ifdef COMPILE_WITH_GUI
if (gui)
{
return las2las_gui(argc, argv, &lasreadopener);
}
#endif
#ifdef COMPILE_WITH_MULTI_CORE
if ((cores > 1) && (lasreadopener.get_file_name_number() > 1) && (!lasreadopener.get_merged()))
{
return las2las_multi_core(argc, argv, &geoprojectionconverter, &lasreadopener, &laswriteopener, cores);
}
#endif
// check input
if (!lasreadopener.active())
{
fprintf(stderr,"ERROR: no input specified\n");
usage(true, argc==1);
}
示例11: main
//.........这里部分代码省略.........
{
num_fail++;
}
else
{
num_warning++;
}
}
else
{
num_pass++;
}
// end the report
xmlwriter.end("report");
// maybe we are doing one report per file
if (one_report_per_file)
{
// report the total verdict
xmlwriter.begin("total");
xmlwriter.write((total_pass == VALIDATE_PASS ? "pass" : ((total_pass & VALIDATE_FAIL) ? "fail" : "warning")));
xmlwriter.beginsub("details");
xmlwriter.write("pass", num_pass);
xmlwriter.write("warning", num_warning);
xmlwriter.write("fail", num_fail);
xmlwriter.endsub("details");
xmlwriter.end("total");
num_pass = 0;
num_warning = 0;
num_fail = 0;
// write which validator was used
write_version(xmlwriter);
// write which command line was used
write_command_line(xmlwriter, argc, argv);
// close the LASvalidator XML output file
xmlwriter.close("LASvalidator");
}
lasreader->close();
delete lasreader;
// in very verbose mode we report the time for each file
if (very_verbose)
{
fprintf(stderr,"needed %.2f sec for '%s'\n", taketime()-start_time, lasreadopener.get_file_name());
start_time = taketime();
}
}
// maybe we are doing one summary report
if (!one_report_per_file)
{
// report the total verdict
xmlwriter.begin("total");
xmlwriter.write((total_pass == 0 ? "pass" : ((total_pass & 1) ? "fail" : "warning")));
xmlwriter.beginsub("details");
xmlwriter.write("pass", num_pass);
xmlwriter.write("warning", num_warning);
xmlwriter.write("fail", num_fail);
xmlwriter.endsub("details");
xmlwriter.end("total");
// write which validator was used
write_version(xmlwriter);
// write which command line was used
write_command_line(xmlwriter, argc, argv);
// close the LASvalidator XML output file
xmlwriter.close("LASvalidator");
}
// in verbose mode we report the total time
if (verbose && (lasreadopener.get_file_name_number() > 1))
{
fprintf(stderr,"done. total time %.2f sec.\n", taketime()-full_start_time);
}
byebye(argc==1);
return 0;
}