On 24/01/12 19:40, Johannes Formann wrote:
after using the adress index feature, the image merging doesn't work
anymore.

java '-Xms256m' '-Xmx2560m' '-jar' 'mkgmap.jar' '--gmapsupp'
'gmapsupp_Basiskarte.img' '/home/osm/radkarte/gmapsupp_Hoehenlinien.img'
'gmapsupp_RadRouten.img' 'gmapsupp_Steigungen.img'
'gmapsupp_fixMeLayer.img'

Is this known?
Is there a workaround if it is known? I'd like to keep the
"Layer"-Feature so I'd be able to choose the maps on my Oregon 450 "on
demand".

It is known that it is not possible to create a gmapsupp with an
address index by combining gmapsupp.img files.

I did not know that attempts to combine gmapsupp.img files that contain
an index will give you an empty file. This bug has actually been there
since r1334, but didn't show up since our gmapsupp files did not contain an index.

Since you cannot create an index while combining gmapsupp files, then a
workaround is to avoid creating the index in the individual files.

The attached patch solves the problem with combining in any case.

Thanks,

..Steve

Index: src/uk/me/parabola/mkgmap/combiners/FileInfo.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/mkgmap/combiners/FileInfo.java	(revision 2185)
+++ src/uk/me/parabola/mkgmap/combiners/FileInfo.java	(revision )
@@ -240,8 +240,9 @@
 				} else if ("NOD".equals(ext)) {
 					info.setNodsize(ent.getSize());
 				} else if ("MDR".equals(ext)) {
-					// It is not actually a regular img file, so change the kind.
+					// If there is no TRE then it is not actually a regular img file, so change the kind.
+					if (!hasTre)
-					info.setKind(MDR_KIND);
+						info.setKind(MDR_KIND);
 				} else if ("MPS".equals(ext)) {
 					// This is a gmapsupp file containing several maps.
 					info.setKind(GMAPSUPP_KIND);
Index: src/uk/me/parabola/mkgmap/combiners/GmapsuppBuilder.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/mkgmap/combiners/GmapsuppBuilder.java	(revision 2185)
+++ src/uk/me/parabola/mkgmap/combiners/GmapsuppBuilder.java	(revision )
@@ -338,7 +338,7 @@
 		List<DirectoryEntry> entries = infs.list();
 		for (DirectoryEntry ent : entries) {
 			String ext = ent.getExt();
-			if (ext.equals("   ") || ext.equals("MPS"))
+			if (ext.equals("   ") || ext.equals("MPS") || ext.equals("MDR"))
 				continue;
 
 			String inname = ent.getFullName();
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to