Steve Ratcliffe schreef:
> Perhaps it belongs in the splitter doc then?  Or the splitter
> could leave out (or comment out) the description lines
> by default, unless the --description option is given.

Like in the attached patch? (Usual disclaimers apply: I'm not a
programmer, I don't know Java, batteries not included).

If you think this patch is ready for committing, then you might want to
commit the attached documentation patch for mkgmap as well (credits
mainly to Marko Mäkelä for this one).

Best regards,

Valentijn
Index: src/uk/me/parabola/splitter/SubArea.java
===================================================================
--- src/uk/me/parabola/splitter/SubArea.java	(revision 78)
+++ src/uk/me/parabola/splitter/SubArea.java	(working copy)
@@ -88,7 +88,7 @@
 				bounds.getMinLong() - extra,
 				bounds.getMaxLat() + extra,
 				bounds.getMaxLong() + extra);
-
+		// System.out.println("Extra: %f, degrees %f");
 		String filename = new Formatter().format(Locale.ROOT, "%08d.osm.gz", mapid).toString();
 		try {
 			FileOutputStream fos = new FileOutputStream(filename);
Index: src/uk/me/parabola/splitter/Main.java
===================================================================
--- src/uk/me/parabola/splitter/Main.java	(revision 78)
+++ src/uk/me/parabola/splitter/Main.java	(working copy)
@@ -175,7 +175,7 @@
 		mapid = config.getProperty("mapid", config.getProperty("mapname", mapid));
 		overlapAmount = config.getProperty("overlap", overlapAmount);
 		maxNodes = config.getProperty("max-nodes", maxNodes);
-		description = config.getProperty("description", "OSM Map");
+		description = config.getProperty("description");
 		resolution = config.getProperty("resolution", resolution);
 		if (resolution < 1 || resolution > 24) {
 			System.err.println("The --resolution parameter must be a value between 1 and 24. Resetting to 13.");
@@ -375,7 +375,8 @@
 		for (SubArea a : areaList.getAreas()) {
 			w.println();
 			w.format("mapname: %d\n", a.getMapid());
-			w.println("description: " + description);
+			if (description==null) w.println("# description: OSM Map");
+			else w.println("description: " + description);
 			w.format("input-file: %d.osm.gz\n", a.getMapid());
 		}
 
Index: resources/help/en/options
===================================================================
--- resources/help/en/options	(revision 1147)
+++ resources/help/en/options	(working copy)
@@ -26,6 +26,10 @@
 	line can be used, however you omit the leading '--'.  The short
 	option names with a single '-' cannot be used, simply use the
 	long name instead.
+	Note: mkgmap will process options from left to right.  Options given
+	in the command line after "-c filename" will override any options
+	given in the file.  Likewise, command line options specified before
+	"-c filename" will be overridden by the option file.
 
 -n name
 --mapname=name
@@ -36,7 +40,8 @@
 
 --description=text
 	Sets the descriptive text for the map. This may be displayed in
-	QLandkarte, MapSource on on a GPS etc. 
+	QLandkarte, MapSource or on a GPS etc, where it is normally shown
+	below the family name. Example: --description="Germany, Denmark"
 
 --country-name=name
 	Sets the map's country name. The default is "COUNTRY".
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to