[Git][debian-gis-team/mkgmap][upstream] New upstream version 0.0.0+svn4916
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Wed Nov 1 04:29:08 GMT 2023
Bas Couwenberg pushed to branch upstream at Debian GIS Project / mkgmap
Commits:
1771d243 by Bas Couwenberg at 2023-11-01T05:19:31+01:00
New upstream version 0.0.0+svn4916
- - - - -
18 changed files:
- resources/mkgmap-version.properties
- resources/sort/README
- resources/sort/cp0.txt
- resources/sort/cp1250.txt
- resources/sort/cp1251.txt
- resources/sort/cp1253.txt
- resources/sort/cp1254.txt
- resources/sort/cp1255.txt
- resources/sort/cp1256.txt
- resources/sort/cp1257.txt
- resources/sort/cp1258.txt
- resources/sort/cp65001.txt
- src/uk/me/parabola/imgfmt/Utils.java
- src/uk/me/parabola/imgfmt/app/Coord.java
- src/uk/me/parabola/mkgmap/reader/polish/PolishMapDataSource.java
- test/func/SimpleTest.java
- test/func/files/GmapsuppTest.java
- test/func/route/SimpleRouteTest.java
Changes:
=====================================
resources/mkgmap-version.properties
=====================================
@@ -1,2 +1,2 @@
-svn.version: 4912
-build.timestamp: 2023-09-18T09:52:51+0100
+svn.version: 4916
+build.timestamp: 2023-10-13T08:23:57+0100
=====================================
resources/sort/README
=====================================
@@ -35,22 +35,24 @@ ID values
I believe that these are arbitary identifiers. Here is a registry of
values we are using. If you make a variation on a code-page
sort-order then give it a different id2 value.
-
-code-page id1 id2
-
-1250 12 1
-1251 8 1
-1252 7 2
-1253 13 1
-1254 14 1
-1255 15 1
-1256 16 1
-1257 17 1
-1258 18 1
-874 11 1
-932 9 1
-936 5 1
-949 10 1
-
-65001 19 4
-0 0 0
+It is believed that having sorts with the same id1/id2 but different data loaded
+on the same device will give unexpected results
+
+code-page id1 description
+
+1250 12 Central European sort
+1251 8 Cyrillic sort
+1252 7 Western European sort
+1253 13 Greek sort
+1254 14 Turkish sort
+1255 15 Hebrew sort
+1256 16?9 Arabic sort cp1256.txt has id1=9, original version of this doc said 16
+1257 17 Latin Baltic sort
+1258 18 Vietnamese sort
+874 11 Thai. 8-bit not implemented
+932 9 Japanese. Shift JIS not implemented. Note id1=9 used by 1256
+936 5 Simplified Chinese not implemented
+949 10 Korean. Unified Hangui not implemented
+
+65001 19 Unicode sort
+0 0 ASCII 7-bit sort
=====================================
resources/sort/cp0.txt
=====================================
@@ -1,9 +1,11 @@
codepage 0
id1 0
-id2 1
+# 13-Oct-2023 Increment id2/version. Fix '#' to 0023
+id2 2
description "ASCII 7-bit sort"
characters
+
=0008=000e=000f=0010=0011=0012=0013=0014=0015=0016=0017=0018=0019=001a=001b=001c=001d=001e=001f=007f,0001,0002,0003,0004,0005,0006,0007
< 0009
< 000a
@@ -32,7 +34,7 @@ characters
< /
< \
< &
- < #
+ < 0023
< %
< `
< ^
@@ -79,3 +81,5 @@ characters
< x,X
< y,Y
< z,Z
+
+# ends
=====================================
resources/sort/cp1250.txt
=====================================
@@ -1,9 +1,11 @@
codepage 1250
id1 12
-id2 1
+# 13-Oct-2023 Increment id2/version. Fix '#' to 0023
+id2 2
description "Central European sort"
characters
+
=0008=000e=000f=0010=0011=0012=0013=0014=0015=0016=0017=0018=0019=001a=001b=001c=001d=001e=001f=007f=00ad,0001,0002,0003,0004,0005,0006,0007
< 0009
< 000a
@@ -45,7 +47,7 @@ characters
< /
< \
< &
- < #
+ < 0023
< %
< ‰
< †
@@ -120,3 +122,5 @@ expand ˝ to ¸ `
expand ˛ to § 0020
expand ß to s s
expand ™ to T M
+
+# ends
=====================================
resources/sort/cp1251.txt
=====================================
@@ -1,9 +1,11 @@
codepage 1251
id1 8
-id2 1
+# 13-Oct-2023 Increment id2/version. Fix '#' to 0023
+id2 2
description "Cyrillic sort"
characters
+
=0008=000e=000f=0010=0011=0012=0013=0014=0015=0016=0017=0018=0019=001a=001b=001c=001d=001e=001f=007f=00ad,0001,0002,0003,0004,0005,0006,0007
< 0009
< 000a
@@ -45,7 +47,7 @@ characters
< /
< \
< &
- < #
+ < 0023
< %
< ‰
< †
@@ -152,7 +154,8 @@ characters
< э,Э
< ю,Ю
< я,Я
-
expand … to . . .
expand № to N o
expand ™ to T M
+
+# ends
=====================================
resources/sort/cp1253.txt
=====================================
@@ -1,6 +1,7 @@
codepage 1253
id1 13
-id2 1
+# 13-Oct-2023 Increment id2/version. Fix '#' to 0023
+id2 2
description "Greek sort"
characters
@@ -47,7 +48,7 @@ characters
< /
< \
< &
- < #
+ < 0023
< %
< ‰
< †
@@ -140,3 +141,5 @@ characters
expand … to . . .
expand ½ to 1 / 2
expand ™ to T M
+
+# ends
=====================================
resources/sort/cp1254.txt
=====================================
@@ -1,10 +1,12 @@
codepage 1254
id1 14
-id2 1
+# 12-Oct-2023 Increment id2/version. Fix '#' to 0023
+id2 2
description "Turkish sort"
characters
-= 0008=000e=000f=0010=0011=0012=0013=0014=0015=0016=0017=0018=0019=001a=001b=001c=001d=001e=001f=007f=00ad,0001,0002,0003,0004,0005,0006,0007
+
+=0008=000e=000f=0010=0011=0012=0013=0014=0015=0016=0017=0018=0019=001a=001b=001c=001d=001e=001f=007f=00ad,0001,0002,0003,0004,0005,0006,0007
< 0009
< 000a
< 000b
@@ -47,7 +49,7 @@ characters
< /
< \
< &
- < #
+ < 0023
< %
< ‰
< †
@@ -127,3 +129,5 @@ expand ½ to 1 / 2
expand ¾ to 3 / 4
expand ß to s s
expand ™ to T M
+
+# ends
=====================================
resources/sort/cp1255.txt
=====================================
@@ -1,6 +1,7 @@
codepage 1255
id1 15
-id2 1
+# 13-Oct-2023 Increment id2/version. Fix '#' to 0023
+id2 2
description "Hebrew sort"
characters
@@ -49,7 +50,7 @@ characters
< /
< \
< &
- < #
+ < 0023
< %
< ‰
< †
@@ -157,3 +158,5 @@ expand ™ to T M
expand װ to ו ו
expand ױ to ו י
expand ײ to י י
+
+# ends
=====================================
resources/sort/cp1256.txt
=====================================
@@ -1,176 +1,176 @@
-
codepage 1256
id1 9
-id2 1
+# 13-Oct-2023 Increment id2/version. Fix '#' to 0023
+id2 2
description "Arabic sort"
characters
=0008=000e=000f=0010=0011=0012=0013=0014=0015=0016=0017=0018=0019=001a=001b=001c=001d=001e=001f=007f=200c=200d=00ad=ـ=200e=200f,0001,0002,0003,0004,0005,0006,0007 ; 064b ; 064c ; 064d ; 064e ; 064f ; 0650 ; 0651 ; 0652
-< 0009
-< 000a
-< 000b
-< 000c
-< 000d
-< 0020,00a0
-< _
-< -
-< –
-< —
-< 002c
-< ،
-< 003b
-< ؛
-< :
-< !
-< ?
-< ؟
-< .
-< ·
-< '
-< ‘
-< ’
-< ‚
-< ‹
-< ›
-< "
-< “
-< ”
-< „
-< «
-< »
-< (
-< )
-< [
-< ]
-< {
-< }
-< @
-< *
-< /
-< \
-< &
-< #
-< %
-< ‰
-< †
-< ‡
-< •
-< `
-< ´
-< ^
-< ¯
-< ¨
-< ¸
-< §
-< ¶
-< ©
-< ®
-< ˆ
-< °
-< +
-< ±
-< ÷
-< ×
-< 003c
-< 003d
-< >
-< ¬
-< |
-< ¦
-< ~
-< ¤
-< ¢
-< $
-< £
-< ¥
-< €
-< 0
-< 1,¹
-< 2,²
-< 3,³
-< 4
-< 5
-< 6
-< 7
-< 8
-< 9
-< a,A ; à ; â
-< b,B
-< c,C ; ç
-< d,D
-< e,E ; é ; è ; ê ; ë
-< f,F
-< ƒ
-< g,G
-< h,H
-< i,I ; î ; ï
-< j,J
-< k,K
-< l,L
-< m,M
-< n,N
-< o,O ; ô
-< p,P
-< q,Q
-< r,R
-< s,S
-< t,T
-< u,U ; ù ; û ; ü
-< v,V
-< w,W
-< x,X
-< y,Y
-< z,Z
-< µ
-< ء
-< آ
-< أ
-< ؤ
-< إ
-< ئ
-< ا
-< ب
-< پ
-< ة
-< ت
-< ث
-< ٹ
-< ج
-< چ
-< ح
-< خ
-< د
-< ذ
-< ڈ
-< ر
-< ز
-< ڑ
-< ژ
-< س
-< ش
-< ص
-< ض
-< ط
-< ظ
-< ع
-< غ
-< ف
-< ق
-< ك
-< ک
-< گ
-< ل
-< م
-< ن
-< ں
-< ه
-< ھ
-< ہ
-< و
-< ى
-< ي
-< ے
+ < 0009
+ < 000a
+ < 000b
+ < 000c
+ < 000d
+ < 0020,00a0
+ < _
+ < -
+ < –
+ < —
+ < 002c
+ < ،
+ < 003b
+ < ؛
+ < :
+ < !
+ < ?
+ < ؟
+ < .
+ < ·
+ < '
+ < ‘
+ < ’
+ < ‚
+ < ‹
+ < ›
+ < "
+ < “
+ < ”
+ < „
+ < «
+ < »
+ < (
+ < )
+ < [
+ < ]
+ < {
+ < }
+ < @
+ < *
+ < /
+ < \
+ < &
+ < 0023
+ < %
+ < ‰
+ < †
+ < ‡
+ < •
+ < `
+ < ´
+ < ^
+ < ¯
+ < ¨
+ < ¸
+ < §
+ < ¶
+ < ©
+ < ®
+ < ˆ
+ < °
+ < +
+ < ±
+ < ÷
+ < ×
+ < 003c
+ < 003d
+ < >
+ < ¬
+ < |
+ < ¦
+ < ~
+ < ¤
+ < ¢
+ < $
+ < £
+ < ¥
+ < €
+ < 0
+ < 1,¹
+ < 2,²
+ < 3,³
+ < 4
+ < 5
+ < 6
+ < 7
+ < 8
+ < 9
+ < a,A ; à ; â
+ < b,B
+ < c,C ; ç
+ < d,D
+ < e,E ; é ; è ; ê ; ë
+ < f,F
+ < ƒ
+ < g,G
+ < h,H
+ < i,I ; î ; ï
+ < j,J
+ < k,K
+ < l,L
+ < m,M
+ < n,N
+ < o,O ; ô
+ < p,P
+ < q,Q
+ < r,R
+ < s,S
+ < t,T
+ < u,U ; ù ; û ; ü
+ < v,V
+ < w,W
+ < x,X
+ < y,Y
+ < z,Z
+ < µ
+ < ء
+ < آ
+ < أ
+ < ؤ
+ < إ
+ < ئ
+ < ا
+ < ب
+ < پ
+ < ة
+ < ت
+ < ث
+ < ٹ
+ < ج
+ < چ
+ < ح
+ < خ
+ < د
+ < ذ
+ < ڈ
+ < ر
+ < ز
+ < ڑ
+ < ژ
+ < س
+ < ش
+ < ص
+ < ض
+ < ط
+ < ظ
+ < ع
+ < غ
+ < ف
+ < ق
+ < ك
+ < ک
+ < گ
+ < ل
+ < م
+ < ن
+ < ں
+ < ه
+ < ھ
+ < ہ
+ < و
+ < ى
+ < ي
+ < ے
expand … to . . .
expand ¼ to 1 / 4
@@ -179,3 +179,5 @@ expand ¾ to 3 / 4
expand œ to o e
expand Œ to O E
expand ™ to T M
+
+# ends
=====================================
resources/sort/cp1257.txt
=====================================
@@ -1,6 +1,7 @@
codepage 1257
id1 17
-id2 1
+# 13-Oct-2023 Increment id2/version. Fix '#' to 0023
+id2 2
description "Latin Baltic sort"
characters
@@ -46,7 +47,7 @@ characters
< /
< \
< &
- < #
+ < 0023
< %
< ‰
< †
@@ -127,3 +128,5 @@ expand æ to a e
expand Æ to A E
expand ß to s s
expand ™ to T M
+
+# ends
=====================================
resources/sort/cp1258.txt
=====================================
@@ -1,6 +1,7 @@
codepage 1258
id1 18
-id2 1
+# 13-Oct-2023 Increment id2/version. Fix '#' to 0023
+id2 2
description "Vietnamese sort"
characters
@@ -48,7 +49,7 @@ characters
< /
< \
< &
- < #
+ < 0023
< %
< ‰
< †
@@ -132,3 +133,5 @@ expand œ to o e
expand Œ to O E
expand ß to s s
expand ™ to T M
+
+# ends
=====================================
resources/sort/cp65001.txt
=====================================
@@ -1,3 +1,7 @@
+# use extra/src/uk/me/parabola/util/CollationRules.java to generate some of the tables.
+# This uses https://www.unicode.org/Public/UCA/latest/allkeys.txt
+# see https://www.mkgmap.org.uk/pipermail/mkgmap-dev/2021q4/033096.html
+
codepage 65001
id1 19
id2 4
@@ -11133,3 +11137,5 @@ expand ㍔ to る ー ふ る
expand ㍕ to れ む
expand ㍖ to れ ん と こ ん
expand ㍗ to ゎ っ と
+
+# ends
=====================================
src/uk/me/parabola/imgfmt/Utils.java
=====================================
@@ -116,15 +116,17 @@ public class Utils {
* A map unit is an integer value that is 1/(2^24) degrees of latitude or
* longitude.
*
- * @param l The lat or long as decimal degrees.
+ * @param degrees The latitude or longitude as decimal degrees.
* @return An integer value in map units.
*/
- public static int toMapUnit(double l) {
- final double DELTA = 360.0D / (1 << 24) / 2; //Correct rounding
- if (l > 0)
- return (int) ((l + DELTA) * (1 << 24)/360);
- else
- return (int) ((l - DELTA) * (1 << 24)/360);
+ public static int toMapUnit(double degrees) {
+ // do Round rather than Trunc: add a half and a lot extra so that the (int)op
+ // is always positive to avoid negative truncation to zero and give uniform
+ // boundary behaviour
+ final double DELTA = 360.0D / (1 << 24) / 2 + 360.0D;
+ final double RESCALE = (1 << 24) / 360.0D;
+ final int UNDO360 = 1 << 24;
+ return (int)((degrees + DELTA) * RESCALE) - UNDO360;
}
/**
=====================================
src/uk/me/parabola/imgfmt/app/Coord.java
=====================================
@@ -669,9 +669,12 @@ public class Coord implements Comparable<Coord> {
* @return An integer value with {@code HIGH_PREC_BITS} bit precision.
*/
private static int toHighPrec(double degrees) {
- final double DELTA = 360.0D / FACTOR_HP / 2; // Correct rounding
- double v = (degrees > 0) ? degrees + DELTA : degrees - DELTA;
- return (int) (v * FACTOR_HP / 360);
+ // this is a bit like Utils.toMapUnit() except needs to be offset to give range -31..+32
+ // in each MapUnit in Coord() calc above; this is accomplished by not rounding
+ final double DELTA = 360.0D;
+ final double RESCALE = (1 << HIGH_PREC_BITS) / 360.0D;
+ final int UNDO360 = 1 << HIGH_PREC_BITS;
+ return (int)((degrees + DELTA) * RESCALE) - UNDO360;
}
/* Factor for conversion to radians using HIGH_PREC_BITS bits
=====================================
src/uk/me/parabola/mkgmap/reader/polish/PolishMapDataSource.java
=====================================
@@ -572,6 +572,8 @@ public class PolishMapDataSource extends MapperBasedMapDataSource implements Loa
private void fixElevation() {
if (elevUnits == 'm') {
String h = polyline.getName();
+ if (h == null)
+ return;
try {
// Convert to feet.
double m = Double.parseDouble(h);
=====================================
test/func/SimpleTest.java
=====================================
@@ -95,7 +95,7 @@ public class SimpleTest extends Base {
case "RGN":
count++;
System.out.println("RGN size " + size);
- assertThat("RGN size", size, new RangeMatcher(2631,3));
+ assertThat("RGN size", size, new RangeMatcher(2630,3));
break;
case "TRE":
count++;
=====================================
test/func/files/GmapsuppTest.java
=====================================
@@ -386,7 +386,7 @@ public class GmapsuppTest extends Base {
r.read(buf);
assertEquals(1256, buf.getChar(0x15));
- assertEquals(0x010009, buf.getInt(0x17));
+ assertEquals(0x020009, buf.getInt(0x17));
}
/**
=====================================
test/func/route/SimpleRouteTest.java
=====================================
@@ -52,7 +52,7 @@ public class SimpleRouteTest extends Base {
case "RGN":
count++;
System.out.println("RGN size " + size);
- assertThat("RGN size", size, new RangeMatcher(126084));
+ assertThat("RGN size", size, new RangeMatcher(126035));
break;
case "TRE":
count++;
@@ -90,7 +90,7 @@ public class SimpleRouteTest extends Base {
case "RGN":
count++;
System.out.println("RGN size " + size);
- assertThat("RGN size", size, new RangeMatcher(2746,3));
+ assertThat("RGN size", size, new RangeMatcher(2743,3));
break;
case "TRE":
count++;
View it on GitLab: https://salsa.debian.org/debian-gis-team/mkgmap/-/commit/1771d243b99ef66a8a53a921329b7247e747b5f3
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/mkgmap/-/commit/1771d243b99ef66a8a53a921329b7247e747b5f3
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20231101/7aee8c74/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list