diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-01-04 16:51:30 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2018-01-05 00:29:04 +0100 |
| commit | 7449edfb10496e2e8d1633d6fe77201787ae7ad8 (patch) | |
| tree | bbbb11dc9ffe2c07b87f5183b8260466c6fa6fb4 /test | |
| parent | 81df68d8aa1ad9d9bb50f7266b231ec44cd36885 (diff) | |
| download | PROJ-7449edfb10496e2e8d1633d6fe77201787ae7ad8.tar.gz PROJ-7449edfb10496e2e8d1633d6fe77201787ae7ad8.zip | |
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
Diffstat (limited to 'test')
| -rw-r--r-- | test/gie/unitconvert.gie | 28 |
1 files changed, 28 insertions, 0 deletions
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 +------------------------------------------------------------------------------- + +<gie> + +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 + +</gie> |
