Re: [mkgmap-dev] side effects add-pois-to-lines

2011-11-26 Thread Torsten Leistikow
Moin,

Felix Hartmann schrieb am 17.11.2011 19:35:
 There are only very very few cases where I 
 can see this option having any sense for me, so I would have to use 
 quite a lot of
 
 mkgmap:line2poi!=true
 
 statements.

Actually you do not need so many statements like this, since you can combine
them and delete the main-tag via an action rule. So e.g. if you know, that you
do not want any natural POIs based on lines, you could add a rule like

natural=*  mkgmap:line2poi=true {set natural=}

Surely it would be more straight forward, if could could positively mark the
lines (or areas) in the style for the POI generation, but in the end you can
achieve the same results with both. So I am quite satisfied with the actual
implementation.

Gruss
Torsten
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] side effects add-pois-to-lines

2011-11-26 Thread Minko
Greg,
leisure=track  sport=cycling is certainly not a bug in OSM, but I dont want a 
sport icon on every node of this road.
What I like is displaying a few relevant poi-to-line icons like bad surfaced 
roads, ferry schedules etc. on my map.

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] side effects add-pois-to-lines

2011-11-26 Thread Josef Latt


Am 26.11.2011 15:51, schrieb Greg Troxel:

 Example of unwanted pois on a line element:
 leisure=track  sport=cycling
 http://www.openstreetmap.org/browse/way/41176449

BTW, there is a highway=service, too. Think that's not right.


-- 
PGP Schlüssel: 311D1055
http://keyserver.pgp.com
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] License text

2011-11-26 Thread Thorsten Kukuk
On Thu, Nov 24, Steve Ratcliffe wrote:

 As well as being placed into the .img, all copyright messages are
 collected, de-duplicated and placed into the .tdb file. You can
 display all those copyright information in mapsource via
 help-about-product info.

Doesn't work for me, at least with MapSource 6.15.7. Only the MapSource
copyright is shown, but not the ones of an installed map.

 So I'd like to apply your patch but change the option wording to
 'specify a copyright message for files that do not contain one'
 or something like that.

Attached is the new patch from me, which is able to change both: the
copyright message for the device and what I call license text.
The first one works fine with my Garmin devices. Since my
Mapsource version doesn't display the license text, I'm not really
able to test that part. But by looking at the images with a hex
editor, it looks good, the new text ist there.

  Thorsten

-- 
Thorsten Kukuk, Project Manager/Release Manager SLES
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Index: src/uk/me/parabola/mkgmap/build/MapBuilder.java
===
--- src/uk/me/parabola/mkgmap/build/MapBuilder.java	(Revision 2109)
+++ src/uk/me/parabola/mkgmap/build/MapBuilder.java	(Arbeitskopie)
@@ -21,6 +21,11 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
 
 import uk.me.parabola.imgfmt.app.Coord;
 import uk.me.parabola.imgfmt.app.Exit;
@@ -51,6 +56,7 @@
 import uk.me.parabola.imgfmt.app.trergn.Subdivision;
 import uk.me.parabola.imgfmt.app.trergn.TREFile;
 import uk.me.parabola.imgfmt.app.trergn.Zoom;
+import uk.me.parabola.imgfmt.ExitException;
 import uk.me.parabola.log.Logger;
 import uk.me.parabola.mkgmap.Version;
 import uk.me.parabola.mkgmap.filters.BaseFilter;
@@ -125,6 +131,8 @@
 	
 	private LBLFile lblFile;
 
+	private String licenseFileName;
+
 	public MapBuilder() {
 		regionName = null;
 		locator = new Locator();
@@ -149,6 +157,8 @@
 			poiAddresses = false;
 
 		routeCenterBoundaryType = props.getProperty(route-center-boundary, 0);
+
+		licenseFileName = props.getProperty(license-file, null);
 		
 		locator = new Locator(props);
 	}
@@ -695,19 +705,40 @@
 		//
 		// We use it to add copyright information that there is no room for
 		// elsewhere.
-		map.addInfo(OpenStreetMap and contributors);
-		map.addInfo(www.openstreetmap.org);
-		map.addInfo(Map data licenced under Creative Commons Attribution ShareAlike 2.0);
-		map.addInfo(http://creativecommons.org/licenses/by-sa/2.0/;);
+		if (licenseFileName != null) {
+		File file = new File(licenseFileName);
+		StringBuffer contents = new StringBuffer();
+		BufferedReader reader = null;
 
-		// Pad the version number with spaces so that version
-		// strings that are different lengths do not change the size and
-		// offsets of the following sections.
-		map.addInfo(Map created with mkgmap-r
+		try {
+			reader = new BufferedReader(new FileReader(file));
+			String text = null;
+ 
+			// repeat until all lines is read
+			while ((text = reader.readLine()) != null) {
+			map.addInfo(text);
+			}
+
+			reader.close();
+		} catch (FileNotFoundException e) {
+			throw new ExitException(Could not open license file  + licenseFileName);
+		} catch (IOException e) {
+			throw new ExitException(Error reading license file  + licenseFileName);
+		}
+		} else {
+		map.addInfo(OpenStreetMap and contributors);
+		map.addInfo(www.openstreetmap.org);
+		map.addInfo(Map data licenced under Creative Commons Attribution ShareAlike 2.0);
+		map.addInfo(http://creativecommons.org/licenses/by-sa/2.0/;);
+
+		// Pad the version number with spaces so that version
+		// strings that are different lengths do not change the size and
+		// offsets of the following sections.
+		map.addInfo(Map created with mkgmap-r
 + String.format(%-10s, Version.VERSION));
 
-		map.addInfo(Program released under the GPL);
-
+		map.addInfo(Program released under the GPL);
+		}
 		// There has to be (at least) two copyright messages or else the map
 		// does not show up.  The second one will be displayed at startup,
 		// although the conditions where that happens are not known.
Index: src/uk/me/parabola/mkgmap/reader/osm/OsmMapDataSource.java
===
--- src/uk/me/parabola/mkgmap/reader/osm/OsmMapDataSource.java	(Revision 2109)
+++ src/uk/me/parabola/mkgmap/reader/osm/OsmMapDataSource.java	(Arbeitskopie)
@@ -112,10 +112,9 @@
 	 * @return A list of copyright messages as a String array.
 	 */
 	public String[] copyrightMessages() {
-		return new String[] {
-OpenStreetMap.org contributors,
-See: 

Re: [mkgmap-dev] License text

2011-11-26 Thread Steve Ratcliffe
Hi

 display all those copyright information in mapsource via
 help-about-product info.

 Doesn't work for me, at least with MapSource 6.15.7. Only the MapSource
 copyright is shown, but not the ones of an installed map.

Oh, in later MapSource versions it has moved to Utilities-Manage Map 
Products.

 So I'd like to apply your patch but change the option wording to
 'specify a copyright message for files that do not contain one'
 or something like that.

 Attached is the new patch from me, which is able to change both: the
 copyright message for the device and what I call license text.
OK Thanks.

If you have a gmapsupp.img with 2 tiles with different copyrights, what 
gets shown on the device?

..Steve
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] side effects add-pois-to-lines

2011-11-26 Thread Greg Troxel

Can you explain when you want to have a POI for every node in a way?  It
seems the area-POI code makes one POI for the closed way, and this is
different.  (Not trying to be difficult; I really don't get it.)


pgpXp0TYKSrBh.pgp
Description: PGP signature
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] License text

2011-11-26 Thread Thorsten Kukuk
On Sun, Nov 27, Steve Ratcliffe wrote:

 Hi
 
  display all those copyright information in mapsource via
  help-about-product info.
 
  Doesn't work for me, at least with MapSource 6.15.7. Only the MapSource
  copyright is shown, but not the ones of an installed map.
 
 Oh, in later MapSource versions it has moved to Utilities-Manage Map 
 Products.

Ah, thanks, somehow missed it there.

Ok, at least mapsource 6.15.7 is sorting the lines alphabetical.
Which means even the original mkgmap text is reodered. Looks funny
and of course the text in reodered form doesn't make sense anymore :(
And empty lines are not allowed.
Else it works as expected.

  So I'd like to apply your patch but change the option wording to
  'specify a copyright message for files that do not contain one'
  or something like that.
 
  Attached is the new patch from me, which is able to change both: the
  copyright message for the device and what I call license text.
 OK Thanks.
 
 If you have a gmapsupp.img with 2 tiles with different copyrights, what 
 gets shown on the device?

On the device, both are shown. In mapsource: didn't tested it yeet.

But my expectation is: mapsource will get all lines, sort them
alphabetical and show the unique ones.

  Thorsten

-- 
Thorsten Kukuk, Project Manager/Release Manager SLES
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev