diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-05-03 20:54:42 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-05-03 20:54:42 +0200 |
| commit | c5346c7c25ca9fe281df39eaeefebc1aa4009266 (patch) | |
| tree | 70dcbafe49373a1791dbc03e8830a2892b076221 | |
| parent | 768f76487f4d7486f6e07c2012d4a767f0584d07 (diff) | |
| download | PROJ-c5346c7c25ca9fe281df39eaeefebc1aa4009266.tar.gz PROJ-c5346c7c25ca9fe281df39eaeefebc1aa4009266.zip | |
cs2cs: set time value to HUGE_VAL if not explicitly specified
| -rw-r--r-- | src/apps/cs2cs.cpp | 2 | ||||
| -rwxr-xr-x | test/cli/testvarious | 10 | ||||
| -rw-r--r-- | test/cli/tv_out.dist | 4 |
3 files changed, 16 insertions, 0 deletions
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} <<EOF EOF +echo "##############################################################" >> ${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} <<EOF +59.4967 -117.61748 329.396 +59.4967 -117.61748 329.396 1988 +EOF + + # Done! # do 'diff' with distribution results echo "diff ${OUT} with ${OUT}.dist" diff --git a/test/cli/tv_out.dist b/test/cli/tv_out.dist index 1af09297..dcda5275 100644 --- a/test/cli/tv_out.dist +++ b/test/cli/tv_out.dist @@ -464,3 +464,7 @@ Test EPSG:32631 to EPSG:4326 Test EPSG:4896 to EPSG:7930 3496737.2679 743254.4507 5264462.9620 3496737.7857 743254.0394 5264462.6437 2019.0 3496737.2679 743254.4507 5264462.9620 3496737.9401 743253.8861 5264462.5497 2029.0 +############################################################## +Test ITRF2000 to ITRF1993 +59.4967 -117.61748 329.396 59.4967002 -117.6174799 329.3845529 +59.4967 -117.61748 329.396 59.4967002 -117.6174799 329.3845529 1988 |
