[mapcode] 19/32: Added new C library version dd 2014-08-30
Stefan Fritsch
sf at moszumanska.debian.org
Wed Nov 2 23:27:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
sf pushed a commit to annotated tag v1.33
in repository mapcode.
commit 54dc5d35c53501c50b60185d7cf49565609866a5
Author: Rijn Buve <rijn at buve.nl>
Date: Sat Aug 30 14:28:26 2014 +0200
Added new C library version dd 2014-08-30
---
mapcoder/mapcode_library.doc | Bin 84992 -> 84992 bytes
mapcoder/mapcoder.c | 6 +++++-
mapcoder/readme.txt | 6 ++----
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/mapcoder/mapcode_library.doc b/mapcoder/mapcode_library.doc
index 2f87cf0..fd2b885 100755
Binary files a/mapcoder/mapcode_library.doc and b/mapcoder/mapcode_library.doc differ
diff --git a/mapcoder/mapcoder.c b/mapcoder/mapcoder.c
index ad973f5..e46bb33 100755
--- a/mapcoder/mapcoder.c
+++ b/mapcoder/mapcoder.c
@@ -296,7 +296,7 @@ long x_divider( long miny, long maxy )
int isInRange(long x,long minx,long maxx) // returns nonzero if x in the range minx...maxx
{
if ( minx<=x && x<maxx ) return 1;
- if (x<180000000) x+=360000000; else x-=360000000;
+ if (x<minx) x+=360000000; else x-=360000000; // 1.32 fix FIJI edge case
if ( minx<=x && x<maxx ) return 1;
return 0;
}
@@ -580,6 +580,10 @@ void encode_grid( char* result, long x,long y, int m, int codex, long minx, long
{
relx+=360000000; x+=360000000;
}
+ else if ( relx>=360000000 ) // 1.32 fix FIJI edge case
+ {
+ relx-=360000000; x-=360000000;
+ }
rely /= ygridsize;
relx /= xgridsize;
diff --git a/mapcoder/readme.txt b/mapcoder/readme.txt
index c43af8a..ff205bf 100755
--- a/mapcoder/readme.txt
+++ b/mapcoder/readme.txt
@@ -22,7 +22,5 @@ version history
1.28 bug fix for the needless generation of 7-letter alternatives to short mapcodes in large states in India
1.29 also generate country-wide alternative mapcodes for states
1.30 updated the documentation and extended it with examples and suggestions
-1.31 added lookslikemapcode() and coord2mc1()
-1.32 fixes 1.29 so no country-wide alternative is produced in the edge case where there simply is no country code
-
-
+1.31 added lookslikemapcode();
+1.32 added coord2mc1(); fixed 1.29 so no country-wide alternative is produced in edge cases; prevent FIJI failing to decode at exactly 180 degrees;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapcode.git
More information about the Pkg-grass-devel
mailing list