diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-03-13 11:24:41 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-03-13 11:45:47 +0100 |
| commit | 2247841879faebe007ccade45d04027361d5d26c (patch) | |
| tree | 740a420dc2d28ce5ec567bf7983c1ce9ce99145a /src/apps/cs2cs.cpp | |
| parent | 35425763e70b70f7efc9a5c9616695369609553f (diff) | |
| download | PROJ-2247841879faebe007ccade45d04027361d5d26c.tar.gz PROJ-2247841879faebe007ccade45d04027361d5d26c.zip | |
Tag proj_list_units() as deprecated
Diffstat (limited to 'src/apps/cs2cs.cpp')
| -rw-r--r-- | src/apps/cs2cs.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/apps/cs2cs.cpp b/src/apps/cs2cs.cpp index 6c85d4aa..affd2bec 100644 --- a/src/apps/cs2cs.cpp +++ b/src/apps/cs2cs.cpp @@ -425,11 +425,18 @@ int main(int argc, char **argv) { (void)printf("%9s %-16s %-16s %s\n", le->id, le->major, le->ell, le->name); } else if (arg[1] == 'u') { /* list units */ - const struct PJ_UNITS *lu; - - for (lu = proj_list_units(); lu->id; ++lu) - (void)printf("%12s %-20s %s\n", lu->id, - lu->to_meter, lu->name); + auto units = proj_get_units_from_database(nullptr, nullptr, "linear", false, nullptr); + for( int i = 0; units && units[i]; i++ ) + { + if( units[i]->proj_short_name ) + { + (void)printf("%12s %-20.15g %s\n", + units[i]->proj_short_name, + units[i]->conv_factor, + units[i]->name); + } + } + proj_unit_list_destroy(units); } else if (arg[1] == 'm') { /* list prime meridians */ const struct PJ_PRIME_MERIDIANS *lpm; |
