MCPcopy Create free account
hub / github.com/OSGeo/PROJ / parse_input_line

Function parse_input_line

src/apps/cct.cpp:589–610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587}
588
589PJ_COORD parse_input_line(const char *buf, int *columns, double fixed_height,
590 double fixed_time) {
591 PJ_COORD err = proj_coord(HUGE_VAL, HUGE_VAL, HUGE_VAL, HUGE_VAL);
592 PJ_COORD result = err;
593 int prev_errno = errno;
594 errno = 0;
595
596 result.xyzt.z = fixed_height;
597 result.xyzt.t = fixed_time;
598 result.xyzt.x = cold(buf, columns[0]);
599 result.xyzt.y = cold(buf, columns[1]);
600 if (result.xyzt.z == HUGE_VAL)
601 result.xyzt.z = cold(buf, columns[2]);
602 if (result.xyzt.t == HUGE_VAL)
603 result.xyzt.t = cold(buf, columns[3]);
604
605 if (0 != errno)
606 return err;
607
608 errno = prev_errno;
609 return result;
610}

Callers 1

mainFunction · 0.85

Calls 2

proj_coordFunction · 0.85
coldFunction · 0.85

Tested by

no test coverage detected