[Geographiclib-announce] Bug in UTMUPS::EncodeEPSG (+ fix)
Geographic library
Brought to you by:
karney
From: Charles K. <cha...@sr...> - 2014-01-16 14:26:52
|
Ben Adler found a bug in UTMUPS::EncodeEPSG. Here is the fix diff --git a/src/UTMUPS.cpp b/src/UTMUPS.cpp index 2abf43e..ec66c1d 100644 --- a/src/UTMUPS.cpp +++ b/src/UTMUPS.cpp @@ -292,7 +292,7 @@ namespace GeographicLib { if (zone == UPS) epsg = epsgS; else if (zone >= MINUTMZONE && zone <= MAXUTMZONE) - epsg = epsg + (zone - MINUTMZONE) + epsg01S; + epsg = (zone - MINUTMZONE) + epsg01S; if (epsg >= 0 && northp) epsg += epsgN - epsgS; return epsg; This fix will appear in the next release of GeographicLib |