Because degrees have a value of 1, the following test passes
val degrees = Units.DEGREES
val metres = Units.METRES
val metresPerUnit = Units.convert(1.0, degrees, metres)
assertThat(metresPerUnit, `is`(1.0))
I expected that I could convert a number in metres into the unit of an arbitrary CRS with Units.convert. Instead, it appears from the source that I can only convert similar units, such as metric to metric or imperial to imperial.
Because degrees have a value of 1, the following test passes
I expected that I could convert a number in metres into the unit of an arbitrary CRS with
Units.convert
. Instead, it appears from the source that I can only convert similar units, such as metric to metric or imperial to imperial.Is this the indented behavior?