MCPcopy Create free account
hub / github.com/LAStools/LAStools / parse

Method parse

LASlib/src/lasfilter.cpp:2183–5381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2181}
2182
2183BOOL LASfilter::parse(int argc, char* argv[])
2184{
2185 int i;
2186
2187 BOOL using_keep_class_filter = FALSE;
2188 U32 keep_extended_classification_mask[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
2189 U32 drop_extended_classification_mask[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
2190
2191 for (i = 1; i < argc; i++)
2192 {
2193 if (argv[i][0] == '\0')
2194 {
2195 continue;
2196 }
2197 else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0)
2198 {
2199 return TRUE;
2200 }
2201 else if (strcmp(argv[i], "-hh") == 0)
2202 {
2203 usage();
2204 return TRUE;
2205 }
2206 else if (strncmp(argv[i], "-keep_", 6) == 0)
2207 {
2208 if (strncmp(argv[i], "-keep_first", 11) == 0)
2209 {
2210 if (strcmp(argv[i], "-keep_first") == 0)
2211 {
2212 add_criterion(new LAScriterionKeepFirstReturn());
2213 *argv[i] = '\0';
2214 }
2215 else if (strcmp(argv[i], "-keep_first_of_many") == 0)
2216 {
2217 add_criterion(new LAScriterionKeepFirstOfManyReturn());
2218 *argv[i] = '\0';
2219 }
2220 }
2221 else if (strncmp(argv[i], "-keep_last", 10) == 0)
2222 {
2223 if (strcmp(argv[i], "-keep_last") == 0)
2224 {
2225 add_criterion(new LAScriterionKeepLastReturn());
2226 *argv[i] = '\0';
2227 }
2228 else if (strcmp(argv[i], "-keep_last_of_many") == 0)
2229 {
2230 add_criterion(new LAScriterionKeepLastOfManyReturn());
2231 *argv[i] = '\0';
2232 }
2233 }
2234 else if (strcmp(argv[i], "-keep_middle") == 0)
2235 {
2236 add_criterion(new LAScriterionKeepMiddleReturn());
2237 *argv[i] = '\0';
2238 }
2239 else if (strcmp(argv[i], "-keep_second_last") == 0)
2240 {

Callers 7

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 11

laserrorFunction · 0.85
strToFloatDegPcFailFunction · 0.85
rangeValidateFunction · 0.85
LASMessageFunction · 0.85
parseFunction · 0.85
get_keep_return_maskMethod · 0.80
get_drop_return_maskMethod · 0.80
usageFunction · 0.50
nameMethod · 0.45

Tested by

no test coverage detected