Re: [mkgmap-dev] levels in style aren't processed correctly

2015-05-18 Thread Felix Hartmann
They are processed correctly - but there is no support for level 0 being
different to 24 yet (at least if you want to have things like autorouting
or address search).

On 18 May 2015 at 13:58, Andrzej Popowski po...@poczta.onet.pl wrote:

 Hi,

 I have defined a rule in style like this:
 highway=path [0x16 road_class=0 road_speed=0 level 0]

 When I compile map with --levels=0:24, then I get paths correctly.
 When I use option --levels=0:23, then paths are missing.

 I would expect paths on level 0 regardless of resolution.

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




-- 
Felix Hartman - Openmtbmap.org  VeloMap.org
Floragasse 9/11
1040 Wien
Austria - Österreich
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

[mkgmap-dev] [Patch v1] improve handling of exits

2015-05-18 Thread Gerd Petermann
Hi all,

attached patch changes mkgmap so that
a) the process-exits and process-destination options are also checking
highway=primary roads and also those cases were 
a link divides into two or more further link roads.

b) the exit_to tag on a highway=motorway_junction node is ignored 
when the road is e.g. a highway=trunk  and all connected roads are
trunk_links. Typically, the exit_to tag contains then a list of hints,
but it is not clear which hint is meant for which way.

I've uploaded a binary based on r3598:
http://files.mkgmap.org.uk/download/266/mkgmap.jar

@Dave: Please note the changes in the default style.
It would be great if you could test this patch and maybe suggest 
a better description of the two options.

Gerd


  

exit-from-link-v1.patch
Description: Binary data
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

[mkgmap-dev] levels in style aren't processed correctly

2015-05-18 Thread Andrzej Popowski

Hi,

I have defined a rule in style like this:
highway=path [0x16 road_class=0 road_speed=0 level 0]

When I compile map with --levels=0:24, then I get paths correctly.
When I use option --levels=0:23, then paths are missing.

I would expect paths on level 0 regardless of resolution.

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


Re: [mkgmap-dev] levels in style aren't processed correctly

2015-05-18 Thread Steve Ratcliffe

On 18/05/15 12:58, Andrzej Popowski wrote:

Hi,

I have defined a rule in style like this:
highway=path [0x16 road_class=0 road_speed=0 level 0]

When I compile map with --levels=0:24, then I get paths correctly.
When I use option --levels=0:23, then paths are missing.

I would expect paths on level 0 regardless of resolution.



Yes, that appears to be a bug.  Although it goes back a long way if so.

As a workaround, you can add the levels option to the 'options' file
in the style.

As regards Felix's comment, even if the lack of routing and index is
still true (but I thought that Gerd had fixed that?), the line should
still be present but it isn't.  Also removing the road_speed/class
parameters doesn't affect the outcome.

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


Re: [mkgmap-dev] levels in style aren't processed correctly

2015-05-18 Thread Gerd Petermann
Hi all,

 
 As regards Felix's comment, even if the lack of routing and index is
 still true (but I thought that Gerd had fixed that?), the line should
 still be present but it isn't.  Also removing the road_speed/class
 parameters doesn't affect the outcome.

I once thought that I fixed it, but it turned out that some routines still
don't work when level 0 is not resolution 24. 
In trunk we also still have the problem that you have to use --route 
when you want a correct NET file.

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

[mkgmap-dev] Commit: r3598: fix possible NPE when way has destination:forward or destination:backward tag

2015-05-18 Thread svn commit

Version mkgmap-r3598 was committed by gerd on Mon, 18 May 2015

fix possible NPE when way has destination:forward or destination:backward tag
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] levels in style aren't processed correctly

2015-05-18 Thread Andrzej Popowski

Hi,

I think problem is with initial conversion levels - resolution.

I thought, that levels in style are depreciated, but Steve's suggestion 
works, I get correct results when using proper levels inside options file.


If I delete levels form style, then command line values still aren't 
used. Are they any default values in code?


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


Re: [mkgmap-dev] housenumber2 branch r3589

2015-05-18 Thread GerdP
Hi Bernd,

got no feedback yet. Does it mean you found no errors?
I ask because I still don't see inc/address in your polygons file,
but I see the line
addr:housenumber=* {set mkgmap:execute_finalize_rules=true} 

Gerd

 

Bernd Weigelt wrote
 Hi Gerd
 
 thank you for the good work
 
 i'll test the new version against my styles, after reading the doc ;-) ,
 and 
 give a feedback if there are problems.
 
 Bernd
 
 Am Mittwoch, 13. Mai 2015, 10:58:18 schrieb Gerd Petermann:
 Hi all,
 
 I think I've now found a solution for most of the known problems
 reg. address search, for details see svn log:
 http://www.mkgmap.org.uk/websvn/log.php?repname=mkgmapisdir=1;
 
 ...
 
 Gerd
 
 -- 
 amarok2 now playing:
 
 
 
 
 ___
 mkgmap-dev mailing list

 mkgmap-dev@.org

 http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev





--
View this message in context: 
http://gis.19327.n5.nabble.com/housenumber2-branch-r3589-tp587p5845042.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] levels in style aren't processed correctly

2015-05-18 Thread Steve Ratcliffe
Hi

I've only taken a quick look so far, but it seems that the command line option 
is applied too late and the built in default is used initially to convert the 
level to resolution.  So level 0 is converted to resolution 24 and this is then 
(correctly) omitted from a resolution 23 level.

I did wonder why this has never been noticed before and I think this is 
probably because the default style uses resolution rather than level in the 
type definitions. It is probably only the conversion of level when reading the 
style that is affected and if this is the case then the fix may be relatively 
easy. I will look at it some more later.

..Steve



On 18 May 2015 16:45:31 BST, Andrzej Popowski po...@poczta.onet.pl wrote:
Hi,

I think problem is with initial conversion levels - resolution.

I thought, that levels in style are depreciated, but Steve's suggestion

works, I get correct results when using proper levels inside options
file.

If I delete levels form style, then command line values still aren't 
used. Are they any default values in code?

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


Re: [mkgmap-dev] levels in style aren't processed correctly

2015-05-18 Thread Steve Ratcliffe

Hi


initially to convert the level to resolution.  So level 0 is
converted to resolution 24 and this is then (correctly) omitted from
a resolution 23 level.


Here is a patch to have the --levels option work in this case.

A ready built jar file is here: 
http://files.mkgmap.org.uk/download/267/mkgmap.jar


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


Re: [mkgmap-dev] levels in style aren't processed correctly [PATCH]

2015-05-18 Thread Steve Ratcliffe


... and here is the patch
Index: src/uk/me/parabola/mkgmap/osmstyle/StyleImpl.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+UTF-8
===
--- src/uk/me/parabola/mkgmap/osmstyle/StyleImpl.java	(revision 3598)
+++ src/uk/me/parabola/mkgmap/osmstyle/StyleImpl.java	(revision )
@@ -153,7 +153,9 @@
 			mergeOptions(baseStyle);
 
 		readOptions();
-		
+
+		applyCmdLineOptions(props);
+
 		// read overlays before the style rules to be able to ignore overlaid wrong types. 
 		readOverlays(); 
 		
@@ -162,10 +164,23 @@
 		ListIteratorStyleImpl listIterator = baseStyles.listIterator(baseStyles.size());
 		while (listIterator.hasPrevious())
 			mergeRules(listIterator.previous());
+	}
 
-		// OR: other way
-		//for (StyleImpl s : baseStyles)
-		//	mergeRules(s);
+	/**
+	 * Apply any command line options that are appropriate for the style.
+	 *
+	 * @param props Contains the command line options.
+	 */
+	private void applyCmdLineOptions(EnhancedProperties props) {
+		for (EntryObject, Object ent : props.entrySet()) {
+			String opt = (String) ent.getKey();
+			String val = (String) ent.getValue();
+			if (OPTION_LIST.contains(opt)) {
+// Simple options that have string value.  Perhaps we should allow
+// anything here?
+generalOptions.put(opt, val);
+			}
+		}
 	}
 
 	public String getOption(String name) {
@@ -441,7 +456,7 @@
 	 * @see #mergeRules(StyleImpl)
 	 */
 	private void mergeOptions(StyleImpl other) {
-	for (EntryString, String ent : other.generalOptions.entrySet()) {
+		for (EntryString, String ent : other.generalOptions.entrySet()) {
 			String opt = ent.getKey();
 			String val = ent.getValue();
 			if (OPTION_LIST.contains(opt)) {
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] Commit: r3597: corrections for process-exits option

2015-05-18 Thread Gerd Petermann
Hi Uli,

thanks for reporting. This is fixed with r3598.

Gerd

 Date: Sun, 17 May 2015 22:29:34 -0700
 From: ulib...@gmail.com
 To: mkgmap-dev@lists.mkgmap.org.uk
 Subject: Re: [mkgmap-dev] Commit: r3597: corrections for process-exits option
 
 With this latest version i get the following exception:
 
 java.lang.NullPointerException
 at
 uk.me.parabola.mkgmap.reader.osm.LinkDestinationHook.processWays(Link
 DestinationHook.java:487)
 at
 uk.me.parabola.mkgmap.reader.osm.LinkDestinationHook.end(LinkDestinat
 ionHook.java:737)
 at
 uk.me.parabola.mkgmap.reader.osm.OsmReadingHooksChain.end(OsmReadingH
 ooksChain.java:79)
 at
 uk.me.parabola.mkgmap.reader.osm.o5m.O5mBinMapDataSource.load(O5mBinM
 apDataSource.java:49)
 at
 uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSour
 ce.java:129)
 at
 uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167)
 at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63)
 at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:255)
 at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:251)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
 Source)
 at java.lang.Thread.run(Unknown Source)
 
 This one is new to me.
 
 
 
 --
 View this message in context: 
 http://gis.19327.n5.nabble.com/Commit-r3597-corrections-for-process-exits-option-tp5844899p5844969.html
 Sent from the Mkgmap Development mailing list archive at Nabble.com.
 ___
 mkgmap-dev mailing list
 mkgmap-dev@lists.mkgmap.org.uk
 http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
  ___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] Commit: r3597: corrections for process-exits option

2015-05-18 Thread UliBaer
Hi Gerd,

just to confirm:
Version 3598 works correctly on the same dataset.

Thank you for this really quick response! :)

Best regards, Uli



--
View this message in context: 
http://gis.19327.n5.nabble.com/Commit-r3597-corrections-for-process-exits-option-tp5844899p5845001.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev