From 7449edfb10496e2e8d1633d6fe77201787ae7ad8 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 4 Jan 2018 16:51:30 +0100 Subject: Custom unit factors in unitconvert. Added the possibility to use custom unit factors. Similar to the classic +to_meter parameter the conversion factor is related to meters, i.e. the factor for conversion from kilometers meters is 1000. The custom unit factors is given using the existing xy_in, xy_out, z_in and z_out parameters, for example: proj=unitconvert xy_in=4.5 +xy_out=mm --- test/gie/unitconvert.gie | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 test/gie/unitconvert.gie (limited to 'test') diff --git a/test/gie/unitconvert.gie b/test/gie/unitconvert.gie new file mode 100644 index 00000000..30d9dc0b --- /dev/null +++ b/test/gie/unitconvert.gie @@ -0,0 +1,28 @@ +------------------------------------------------------------------------------- + Tests for the unitconvert operation +------------------------------------------------------------------------------- + + + +operation proj=unitconvert xy_in=m xy_out=dm z_in=cm z_out=mm +tolerance 0.1 +accept 55.25 23.23 45.5 +expect 552.5 232.3 455.0 + +operation proj=unitconvert +xy_in=m +xy_out=m +z_in=m +z_out=m +tolerance 0.1 +accept 12.3 45.6 7.89 +expect 12.3 45.6 7.89 + +operation proj=unitconvert xy_in=dm xy_out=dm +tolerance 0.1 +accept 1 1 1 1 +expect 1 1 1 1 + + +operation proj=unitconvert xy_in=2.0 xy_out=4.0 +tolerance 0.1 +accept 1 1 1 1 +expect 0.5 0.5 1 1 + + -- cgit v1.2.3