From c5346c7c25ca9fe281df39eaeefebc1aa4009266 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 3 May 2019 20:54:42 +0200 Subject: cs2cs: set time value to HUGE_VAL if not explicitly specified --- src/apps/cs2cs.cpp | 2 ++ test/cli/testvarious | 10 ++++++++++ test/cli/tv_out.dist | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/src/apps/cs2cs.cpp b/src/apps/cs2cs.cpp index 40b0d584..20e5e73c 100644 --- a/src/apps/cs2cs.cpp +++ b/src/apps/cs2cs.cpp @@ -123,6 +123,8 @@ static void process(FILE *fid) /* is forward verbatim from the input. */ char *before_time = s; double t = strtod(s, &s); + if( s == before_time ) + t = HUGE_VAL; s = before_time; if (data.v == HUGE_VAL) diff --git a/test/cli/testvarious b/test/cli/testvarious index 7b4a47f3..2e2d854c 100755 --- a/test/cli/testvarious +++ b/test/cli/testvarious @@ -966,6 +966,16 @@ $EXE -f %.4f EPSG:4896 EPSG:7930 -E >> ${OUT} <> ${OUT} +echo "Test ITRF2000 to ITRF1993" >> ${OUT} +# Here we test that HUGE_VAL is passed as the time value if not explicitly +# specified +$EXE -f %.7f ITRF2000 ITRF1993 -E >> ${OUT} <