diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-10-16 22:30:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-16 22:30:23 +0200 |
| commit | 73f7c0eead0cf6fdcf247cd9368cc7d5f72a1f2c (patch) | |
| tree | 63ab16e3fed0243472758809ecb29be38de9f916 /src/PJ_unitconvert.c | |
| parent | 117a3f41c02db4e1413617a948a34083c325c3ea (diff) | |
| parent | 526fe4975e789e3437646adbe86608616eac21fe (diff) | |
| download | PROJ-iso19111_dev.tar.gz PROJ-iso19111_dev.zip | |
Merge pull request #1148 from kbevers/lists-to-proj.hiso19111_dev
Move struct definitions for proj_list_* functions to proj.h
Diffstat (limited to 'src/PJ_unitconvert.c')
| -rw-r--r-- | src/PJ_unitconvert.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/PJ_unitconvert.c b/src/PJ_unitconvert.c index 6e53f6df..e3824c20 100644 --- a/src/PJ_unitconvert.c +++ b/src/PJ_unitconvert.c @@ -401,17 +401,20 @@ static double get_unit_conversion_factor(const char* name, /***********************************************************************/ int i; const char* s; + const PJ_UNITS *units; + + units = proj_list_units(); /* Try first with linear units */ - for (i = 0; (s = pj_units[i].id) ; ++i) { + for (i = 0; (s = units[i].id) ; ++i) { if ( strcmp(s, name) == 0 ) { if( p_normalized_name ) { - *p_normalized_name = pj_units[i].name; + *p_normalized_name = units[i].name; } if( p_is_linear ) { *p_is_linear = 1; } - return pj_units[i].factor; + return units[i].factor; } } |
