<div dir="ltr"><div>FYI<br></div><div><br></div><div>In my workflow, the source TYP file is not modified. Both TYP files, the original and the x-version, are identical. However, my TYP file is not a text file; it is a binary file that the TYPViewer program generates. How that plays in this scenario I have no idea.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 19, 2021 at 9:56 AM Gerd Petermann <<a href="mailto:gpetermann_muenchen@hotmail.com">gpetermann_muenchen@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Ticker,<br>
<br>
OK, I agree that it isn't the best idea to modify a source file.<br>
So, maybe mkgmap should stop with an error message if that would happen?<br>
<br>
Gerd<br>
<br>
________________________________________<br>
Von: mkgmap-dev <<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk" target="_blank">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>> im Auftrag von Ticker Berkin <<a href="mailto:rwb-mkgmap@jagit.co.uk" target="_blank">rwb-mkgmap@jagit.co.uk</a>><br>
Gesendet: Sonntag, 19. September 2021 18:31<br>
An: Development list for mkgmap<br>
Betreff: Re: [mkgmap-dev] The x prepended to the *.typ file<br>
<br>
Hi<br>
<br>
With mkgmap compiling the .txt to .typ there is no problem - I'm<br>
assuming this question is only concerned with what happens when<br>
starting with a binary .typ file.<br>
<br>
If the .typ file already exists and has the wrong family/product and is<br>
in the directory that mkgmap will use for output files, then the<br>
options are:<br>
<br>
1/ change the original .typ file, patching the family/product;<br>
  - it must be wrong to change an input file.<br>
<br>
2/ use a different directory for the patched version;<br>
   - but where?<br>
<br>
3/ use a different name for for the patched version;<br>
   - this could be improved, so that rather than prefixing with x, a<br>
   clearer suffix is added to the actual file but when this is added<br>
   to gmapi/gmapsupp, the original name is used for the embedded<br>
   component.<br>
<br>
At the moment mkgmap ignores the last condition "... is in the same<br>
directory ...", but this could be tested and, if not, the name could be<br>
kept and the new file created in the natural output directory.<br>
<br>
Ticker<br>
<br>
On Sun, 2021-09-19 at 08:38 -0700, Dave Swarthout wrote:<br>
> I have wondered where that "x-file" came from for years. To me, it's<br>
> totally unnecessary and confusing. I thought my typ file editor,<br>
> TypViewer, was creating it.<br>
> Even after reading the email and replies, I still don't understand<br>
> the reasoning behind having mkgmap creating this "backup" copy in the<br>
> first place but I think it should be got rid of.<br>
><br>
> Thanks for clearing up the mystery!<br>
><br>
> Dave<br>
><br>
> On Sun, Sep 19, 2021 at 4:30 AM Gerd Petermann <<br>
> <a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a>> wrote:<br>
> > Hi Ticker,<br>
> ><br>
> > please explain why mkgmap is "stuck" with the fixed version. What's<br>
> > the difference between a fixed *.typ file and one that is freshly<br>
> > compiled from *.txt?<br>
> ><br>
> > Gerd<br>
> ><br>
> > ________________________________________<br>
> > Von: mkgmap-dev <<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk" target="_blank">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>> im Auftrag<br>
> > von Ticker Berkin <<a href="mailto:rwb-mkgmap@jagit.co.uk" target="_blank">rwb-mkgmap@jagit.co.uk</a>><br>
> > Gesendet: Sonntag, 19. September 2021 13:25<br>
> > An: Development list for mkgmap; Steve Ratcliffe<br>
> > Betreff: Re: [mkgmap-dev] The x prepended to the *.typ file<br>
> ><br>
> > Hi<br>
> ><br>
> > If you don't use --output_dir but have map sources (.osm.pbf) and<br>
> > results (.img) all in the same place, and you specify a pre-built<br>
> > TYPfile with extension .typ, but it has the wrong family/product,<br>
> > mkgmap can adjust these, but is then stuck as to what to do with<br>
> > the<br>
> > fixed version, hence the "x" prefix to deal with this case.<br>
> ><br>
> > If --output-dir is specified and the .typ file wasn't in that when<br>
> > specified as an input parameter, then could avoid the rename.<br>
> ><br>
> > This doesn't effect me as I always use mkgmap to generate the .typ<br>
> > from<br>
> > the .txt as part of the final map generation process.<br>
> ><br>
> > Ticker<br>
> ><br>
> > On Sun, 2021-09-19 at 10:22 +0000, Gerd Petermann wrote:<br>
> > > Hi all,<br>
> > ><br>
> > > I think there is an old rather confusing glitch in mkgmap class<br>
> > > TypSaver which it is used with a *.typ file as input, as in<br>
> > > java -jar mkgmap.jar --output-dir=<map-folder> --family-id=4711<br>
> > ...<br>
> > > -c splitter-dir\template.args ..\typfiles\existing.typ<br>
> > > to make sure that family-id and product-id are correctly updated<br>
> > in<br>
> > > the *.typ file.<br>
> > > Since 2012 the program creates / overwrites a copy of file<br>
> > > existing.typ in the source(!) directory ..\typfiles with the<br>
> > prefix<br>
> > > "x", so ..\typfiles\xexisting.typ is written instead of<br>
> > > <map-folder>\existing.typ. I can't find it now but I think there<br>
> > were<br>
> > > complains that this name doesn't fit the 8+3 rule for old file<br>
> > > systems and causes trouble on some devices.<br>
> > ><br>
> > > I think when Steve coded this he expected that the *.typ file is<br>
> > in<br>
> > > the output directory, not somewhere else. My conclusions:<br>
> > > - I think it is an error to create the copy in the source<br>
> > directory.<br>
> > > - I see no reason to create a copy with the prepended "x", I<br>
> > would<br>
> > > just create or alter the file in the given output directory.<br>
> > ><br>
> > > @Steve: What case am I missing? What's the reason for the<br>
> > different<br>
> > > name in the copy?<br>
> > > @all: Does anybody rely on this behaviour?<br>
> > ><br>
> > > Gerd<br>
> > > _______________________________________________<br>
> > > mkgmap-dev mailing list<br>
> > > <a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><br>
> > > <a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noreferrer" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
> > _______________________________________________<br>
> > mkgmap-dev mailing list<br>
> > <a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><br>
> > <a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noreferrer" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
> > _______________________________________________<br>
> > mkgmap-dev mailing list<br>
> > <a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><br>
> > <a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noreferrer" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
> ><br>
><br>
> _______________________________________________<br>
> mkgmap-dev mailing list<br>
> <a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><br>
> <a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noreferrer" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
_______________________________________________<br>
mkgmap-dev mailing list<br>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><br>
<a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noreferrer" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
_______________________________________________<br>
mkgmap-dev mailing list<br>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><br>
<a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noreferrer" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Dave Swarthout<br>Homer, Alaska<br>Chiang Mai, Thailand<br>Travel Blog at <a href="http://dswarthout.blogspot.com" target="_blank">http://dswarthout.blogspot.com</a></div></div>