[PROJ] Complete list of unit names?

Kristian Evers kreve at sdfe.dk
Mon Apr 8 01:55:06 PDT 2019


There's also proj_list_units() [0] which returns all the units that PROJ has
known about for years and years. It is not connected to the database in
any way but I assume that there's a good correlation between units
returned by proj_list_units() and what is used in the database. No
guarantees though.

I don't think that this function will be useful for Nyall but it did get me to
think about rewiring the function so that it returns data from the database
instead of from a hard-coded list of units. The same goes for the other
proj_list_* functions. I am not sure if this is possible without breaking the
current API. If a breaking change is necessary I think this is a good candidate
for an API change in conjunction with PROJ 7.

/Kristian

https://proj4.org/development/reference/functions.html#c.proj_list_units

-----Oprindelig meddelelse-----
Fra: PROJ <proj-bounces at lists.osgeo.org> På vegne af Even Rouault
Sendt: 8. april 2019 10:11
Til: proj at lists.osgeo.org
Emne: Re: [PROJ] Complete list of unit names?

Nyall,

> I'm trying to source a complete list of possible values for
> out_unit_name which may be returned by proj_cs_get_axis_info. So far
> I've encountered values like: "degree", "metre" and "US survey foot".
> 
> Can anyone point me to a complete list of values which may be returned
> by this function?

It depends how the CRS was built.
If it is built from a WKT string, it could be in theory anything.
If it is built from a EPSG code, this will be one of the name in the data/sql/
unit_of_measure.sql file
If it is built from a PROJ CRS string, it will be the 3rd column of the
inearUnitDescs[] array at
https://github.com/OSGeo/proj.4/blob/master/src/iso19111/io.cpp#L6030

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
PROJ mailing list
PROJ at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/proj


More information about the PROJ mailing list