Use of ' include "points" from default; ' in custom style file

I have been replacing my use of base-style with 'include' statements and encountered a problem using eg 'include "points" from default;'. When I do this, mkgmap reports that it can't find 'inc/address' , which is included in the default style points file. It turns out that mkgmap is looking for it in my style directory, rather than in the built-in inc location where the default style is located. To work around this, I had to copy the 'inc' directory from mkgmap.jar to my custom style directory. Not an ideal solution, since I would have to do this every time I update mkgmap. Is this a bug, or intended functionality? Regards, Steve

Hi
I have been replacing my use of base-style with 'include' statements and encountered a problem using eg 'include "points" from default;'. When I do this, mkgmap reports that it can't find 'inc/address' , which is included in the default style points file. It turns out that mkgmap is looking for it in my style directory, rather than in the built-in inc location where the default style is located. To work around this, I had
Yes thanks, it really shouldn't work like that. Unfortunately it is not so easy to fix. It makes the include .. from default pretty useless so may have to implement a workaround in the default style to mention default: include 'inc/address' from default. ..Steve

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Steve, an easy solution could be adding a second code-word eg. include_default. Henning -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (MingW32) iQEcBAEBAgAGBQJSHOBfAAoJEPFgsWC7jOeTiwMIAOjbAnnarnM8EA6XyHeeOf8i UaJ3P7Ai23PY7WJxfv+V4cUcEIhRIMaDUxx/2Sfnp3O95w6VXnnQG0bp6xN45lOS wdC7tO9DqxCt5ckGBVZZrJfVHaWNojclHz/ql3IUNcscsKBdnTasWvk96905fFq2 tqUKbduXLi8k/IpshocYko3AcNph0KEDW2cgJ/eKj+PA4nyjKKxXcq9U+7Ipamry QIc7oPyMrNb1WPbfJ5iPDqx9CENQLwH96403CoOR28xqX4RrfSs7LjzdkNPFXPrt kchn14xpKcSrM+ts3hec1B0R09nDW3lfZX8Gx5Fd2Dt2NB54TJdMGo327EfbyXw= =ArJ1 -----END PGP SIGNATURE-----

Hi Here is a patch so that 'include ... from default' should now work. It is quite an extensive patch so worth testing by everyone. A pre-built one is here: http://files.mkgmap.org.uk/download/149/mkgmap.jar I've no idea if it will fix the other problem you observed. If the problem was related to the number of open files, then it might. ..Steve

Hi Steve, I get the following exception when I tried: java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(Unknown Source) at java.util.zip.ZipFile.getEntry(Unknown Source) at java.util.jar.JarFile.getEntry(Unknown Source) at sun.net.www.protocol.jar.URLJarFile.getEntry(Unknown Source) at java.util.jar.JarFile.getJarEntry(Unknown Source) at uk.me.parabola.mkgmap.osmstyle.JarFileLoader.open(JarFileLoader.java: 123) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.loadFile(RuleFileReader .java:91) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.checkCommand(RuleFileRe ader.java:184) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.loadFile(RuleFileReader .java:101) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.checkCommand(RuleFileRe ader.java:184) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.loadFile(RuleFileReader .java:101) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.load(RuleFileReader.jav a:82) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.readRules(StyleImpl.java:302 ) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.<init>(StyleImpl.java:160) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.readStyle(StyleImpl.java:554 ) at uk.me.parabola.mkgmap.reader.osm.RelationStyleHook.init(RelationStyle Hook.java:33) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.pluginChain(OsmMapD ataSource.java:185) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.setupHandler(OsmMap DataSource.java:153) at uk.me.parabola.mkgmap.reader.osm.o5m.O5mBinMapDataSource.load(O5mBinM apDataSource.java:43) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSour ce.java:127) 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:243) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:239) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 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) Exiting - if you want to carry on regardless, use the --keep-going option Time finished: Tue Sep 03 21:53:36 BST 2013 Total time taken: 2214ms On 3 September 2013 21:42, Steve Ratcliffe <steve@parabola.me.uk> wrote:
Hi
Here is a patch so that 'include ... from default' should now work.
It is quite an extensive patch so worth testing by everyone.
A pre-built one is here: http://files.mkgmap.org.uk/**download/149/mkgmap.jar<http://files.mkgmap.org.uk/download/149/mkgmap.jar>
I've no idea if it will fix the other problem you observed. If the problem was related to the number of open files, then it might.
..Steve
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On 03/09/13 21:57, Steve Brophy wrote:
I get the following exception when I tried:
java.lang.IllegalStateException: zip file closed
Ooops, second attempt attached. Pre-built: http://files.mkgmap.org.uk/download/150/mkgmap.jar ..Steve

I tested this, and it fixed the problem of including from the wrong place. Also I saw no repeat of the other errors reported. Thanks, Steve On 3 September 2013 22:14, Steve Ratcliffe <steve@parabola.me.uk> wrote:
On 03/09/13 21:57, Steve Brophy wrote:
I get the following exception when I tried:
java.lang.**IllegalStateException: zip file closed
Ooops, second attempt attached.
..Steve
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On 04/09/13 08:13, Steve Brophy wrote:
I tested this, and it fixed the problem of including from the wrong place. Also I saw no repeat of the other errors reported.
Thanks for testing, that is all good news. For completeness I am attaching a revised version of the patch which removes all the code from the original way of doing this that is no longer used. There is also a patch removing base-style from the "noname" style which I could not do before because of this very bug ;) Prebuilt: http://files.mkgmap.org.uk/download/151/mkgmap.jar ..Steve

Steve, The revised version also works. Steve On 4 September 2013 12:40, Steve Ratcliffe <steve@parabola.me.uk> wrote:
On 04/09/13 08:13, Steve Brophy wrote:
I tested this, and it fixed the problem of including from the wrong place. Also I saw no repeat of the other errors reported.
Thanks for testing, that is all good news.
For completeness I am attaching a revised version of the patch which removes all the code from the original way of doing this that is no longer used.
There is also a patch removing base-style from the "noname" style which I could not do before because of this very bug ;)
..Steve
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (3)
-
Henning Scholland
-
Steve Brophy
-
Steve Ratcliffe