Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Rate of change" units confused with linear/angular/scale units #20

Open
desruisseaux opened this issue Nov 28, 2019 · 0 comments
Open

Comments

@desruisseaux
Copy link
Collaborator

PROJ C++ API defines an osgeo::proj::common::UnitOfMeasure::Type enumeration with the UNKNOWN, NONE, ANGULAR, LINEAR, SCALE, TIME and PARAMETRIC values. For example the METRE is declared of the LINEAR, which is fine. But the following are more problematic:

  • METRE_PER_YEAR declared of type LINEAR
  • ARC_SECOND_PER_YEAR declared of type ANGULAR
  • PPM_PER_YEAR declared of type SCALE

The consequence is that METRE_PER_YEAR is created by PROJ-JNI as an Unit of type Length while it should be a unit of type Speed. Same apply to other rate of changes unit.

There is no clean fix at this time since PROJ does not provides an API for determining that a unit of measurement is actually a rate of change instead than directly the specified type. A possible workaround could be to parse the unit name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant