mkgmap multiple input files

Hi, I would be interested in creating single img tile form multiple input files. Since description of "input-file" parameter is quite imprecise, I have done some testing. I have used template.args in a following form: mapname: 08900000 input-file: 08900001.osm.pbf input-file: 08900002.osm.pbf mapname: 08900001 input-file: 08900003.osm.pbf input-file: 08900004.mp What I have observed: If pbf files cover different area, then mkgmap creates separate img for each pbf. Second mapname seems to be ignored. Mkgmap outputs files with sequential numbers. Polish format mp is read, since mkgmap issues warnings, but these data aren't included in any img. And most interesting: if pbf files cover exactly the same area, they are merged into single tile. This is what I'd like to get. Unfortunately merging is not recognized when creating tdb, index and preview map. For this files, each pbf is treated as separate tile. Resulting mapset is not accepted by Mapsource, it refuses to start. I guess, that merging pbf into single tile is not supported and it is only some incidence, that it works for pbf with the same area. I would like to suggest, to make this procedure official and correct algorithms for Mapsource files accordingly. Could you for example consider new option, like "add-file", which would cause merging input file with a previous one? There shouldn't be much work for pbf, since it nearly works. And it would be a great help if it worked for polish format mp, since it would allow to add data, which is not available in OSM format. -- Best regards Andrzej

Hi Andrzej, splitter can do that for you with some limitations. keep-complete will only handle first given file to splitter. This is quite useful if you give splitter a normal osm-file and a srtm-data-file. So it's merged within splitter and you get all data in your tiles. Henning Am 13.07.2013 14:29, schrieb Andrzej Popowski:
Hi,
I would be interested in creating single img tile form multiple input files. Since description of "input-file" parameter is quite imprecise, I have done some testing.
I have used template.args in a following form:
mapname: 08900000 input-file: 08900001.osm.pbf input-file: 08900002.osm.pbf
mapname: 08900001 input-file: 08900003.osm.pbf input-file: 08900004.mp
What I have observed: If pbf files cover different area, then mkgmap creates separate img for each pbf. Second mapname seems to be ignored. Mkgmap outputs files with sequential numbers.
Polish format mp is read, since mkgmap issues warnings, but these data aren't included in any img.
And most interesting: if pbf files cover exactly the same area, they are merged into single tile. This is what I'd like to get.
Unfortunately merging is not recognized when creating tdb, index and preview map. For this files, each pbf is treated as separate tile. Resulting mapset is not accepted by Mapsource, it refuses to start.
I guess, that merging pbf into single tile is not supported and it is only some incidence, that it works for pbf with the same area. I would like to suggest, to make this procedure official and correct algorithms for Mapsource files accordingly.
Could you for example consider new option, like "add-file", which would cause merging input file with a previous one? There shouldn't be much work for pbf, since it nearly works. And it would be a great help if it worked for polish format mp, since it would allow to add data, which is not available in OSM format.

Hi Henning,
splitter can do that for you with some limitations. keep-complete will only handle first given file to splitter. This is quite useful if you give splitter a normal osm-file and a srtm-data-file. So it's merged within splitter and you get all data in your tiles.
Thanks for information, multiple files in splitter is a useful feature. Unfortunately this is not a substitute for my idea. I have problems with splitter and big files, so I'd rather split some data separately and merge them at mkgmap stage. For pbf files this can be done with osmosis, but merging lasts about the same time as compiling with mkgmap, so I could save some work with the new feature in mkgmap. And what would be really interesting for me is merging pbf with mp files. Or rather I should say merging OSM data with external data not available in pbf format. There are many free data in shp format, that I can easy change to mp, but not to osm/pbf, since available conversion tools are very limited. -- Best regards Andrzej

This is possible, I used to combine maps of different countries at mkgmap stage. First split one map with --mapid=12310001, copy the resulting pbf files to mkgmap directory. Then the second map with --mapid=12320001; again copying the pbf files to mkgmap directory. Then call mkgmap with *.pbf, which will process both sets of pbf files into one map. I did notice a problem with the sea flooding if a coast was not closed though, this was between the British Isles and Sweden, which is why I stopped doing it. But that was before I started using precompiled sea tiles, that would probably have fixed that issue. Geoff -----Original Message----- From: Andrzej Popowski Sent: Sunday, July 14, 2013 11:25 AM To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] mkgmap multiple input files Hi Henning,
splitter can do that for you with some limitations. keep-complete will only handle first given file to splitter. This is quite useful if you give splitter a normal osm-file and a srtm-data-file. So it's merged within splitter and you get all data in your tiles.
Thanks for information, multiple files in splitter is a useful feature. Unfortunately this is not a substitute for my idea. I have problems with splitter and big files, so I'd rather split some data separately and merge them at mkgmap stage. For pbf files this can be done with osmosis, but merging lasts about the same time as compiling with mkgmap, so I could save some work with the new feature in mkgmap. And what would be really interesting for me is merging pbf with mp files. Or rather I should say merging OSM data with external data not available in pbf format. There are many free data in shp format, that I can easy change to mp, but not to osm/pbf, since available conversion tools are very limited. -- Best regards Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (3)
-
Andrzej Popowski
-
Geoff Sherlock
-
Henning Scholland