Given a projection SRID, is there a way I can obtain the coordinates unit string (meter, degree, ...) ?

In PostGIS for example, it looks like it is present in the srtext column of spatial_ref_sys. Should I parse that block of text or is there a shortcut somewhere ?

Is there something in libproj directly ?

Thanks !

  • srtext is a good place; proj4text contains the units as well. – AndreJ Feb 9 '14 at 16:32
  • It might help if you can tell us what the object of this question is. That is, what are you going to do with the units. If you can specify that, we might be able to help with solving the underlying issue in a way that doesn't involve parsing things by hand... – BradHards Feb 11 '14 at 2:14
  • My initial goal is to make sure that the projection is in meters (an assertion in some of my application code...). – leplatrem Feb 14 '14 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.