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

Method check_parse_string

LASlib/src/lasreader_txt.cpp:2272–2397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2270}
2271
2272BOOL LASreaderTXT::check_parse_string(const char* parse_string)
2273{
2274 const char* p = parse_string;
2275 while (p[0])
2276 {
2277 if ((p[0] != 'x') && // we expect the x coordinate
2278 (p[0] != 'y') && // we expect the y coordinate
2279 (p[0] != 'z') && // we expect the z coordinate
2280 (p[0] != 't') && // we expect the gps time
2281 (p[0] != 'R') && // we expect the red channel of the RGB field
2282 (p[0] != 'G') && // we expect the green channel of the RGB field
2283 (p[0] != 'B') && // we expect the blue channel of the RGB field
2284 (p[0] != 'I') && // we expect the NIR channel
2285 (p[0] != 's') && // we expect a string or a number that we don't care about
2286 (p[0] != 'i') && // we expect the intensity
2287 (p[0] != 'a') && // we expect the scan angle
2288 (p[0] != 'n') && // we expect the number of returns of given pulse
2289 (p[0] != 'r') && // we expect the number of the return
2290 (p[0] != 'h') && // we expect the with<h>eld flag
2291 (p[0] != 'k') && // we expect the <k>eypoint flag
2292 (p[0] != 'g') && // we expect the synthetic fla<g>
2293 (p[0] != 'o') && // we expect the <o>verlap flag
2294 (p[0] != 'l') && // we expect the scanner channe<l>
2295 (p[0] != 'E') && // we expect terrasolid echo encoding
2296 (p[0] != 'c') && // we expect the classification
2297 (p[0] != 'u') && // we expect the user data
2298 (p[0] != 'p') && // we expect the point source ID
2299 (p[0] != 'e') && // we expect the edge of flight line flag
2300 (p[0] != 'd') && // we expect the direction of scan flag
2301 (p[0] != 'H') && // we expect hexadecimal coded RGB(I) colors
2302 (p[0] != 'J') && // we expect a hexadecimal coded intensity
2303 (p[0] != HSL_H) && // we expect one of the non ascii special flags for HSL and HSV
2304 (p[0] != HSL_S) &&
2305 (p[0] != HSL_L) &&
2306 (p[0] != HSV_H) &&
2307 (p[0] != HSV_S) &&
2308 (p[0] != HSV_V) &&
2309 (p[0] != HSL_h) &&
2310 (p[0] != HSL_s) &&
2311 (p[0] != HSL_l) &&
2312 (p[0] != HSV_h) &&
2313 (p[0] != HSV_s) &&
2314 (p[0] != HSV_v))
2315 {
2316 if ((p[0] >= '0') && (p[0] <= '9'))
2317 {
2318 I32 index = (I32)(p[0] - '0');
2319 if (index >= header.number_attributes)
2320 {
2321 laserror("extra bytes attribute '%d' was not described.", index);
2322 return FALSE;
2323 }
2324 attribute_starts[index] = header.get_attribute_start(index);
2325 }
2326 else if (p[0] == '(')
2327 {
2328 p++;
2329 if ((p[0] >= '0') && (p[0] <= '9'))

Callers

nothing calls this directly

Calls 1

laserrorFunction · 0.85

Tested by

no test coverage detected