logo separator

[mkgmap-dev] Text format for TYP files

From Felix Hartmann extremecarver at googlemail.com on Fri Jan 15 20:40:52 GMT 2010


On 15.01.2010 21:20, Marko Mäkelä wrote:
> Hi Felix, all,
>
> On Thu, Jan 14, 2010 at 11:39:51PM +0100, Felix Hartmann wrote:
>    
>> I use maptk: http://maptk.dnsalias.com/
>> it is freeware but not OS - it is however available for Python, Linux
>> and Windows.
>>      
> Thank you for the hint.  I downloaded "MapTk 2.7 Python.zip".  The software
> is in .pyc files that have apparently been compiled on Windows.  The only
> non-binary file is MapTk.pyw, which requires python-tk and Tcl/Tk to run.
> I decompiled and compiled one simple TYP file (two line styles) that I had
> created with http://ati.land.cz/gps/typdecomp/.  It was 2 bytes shorter
> than before, even though the string "MapTk 2.7\0" was appended to the end.
> That is, some things were possibly lost in the conversion.  It could be
> harmless, such as representing the lines with fewer bits per pixel
> (I used 2 colors even though it was declared as 4-colour).
>    
maptk only supports 2 colors (as no nightmode support is included, 4 
colors mean 2 colors daymode and 2 colors in nightmode). It could well 
be that maptk did some changes to the colour palette. I think it tries 
to make colors work more or less the same on old 256 colour units (like 
legen/vista/60CSx/edge) as for 16/24bit displays.
>    
>> This is the most reliable TYP-File editor/compilor for me. It supports
>> in text editing and also exporting to genTYP format (PRJ to mapedit
>> skin). It does not support GUI night mode editing however (I think one
>> can edit nightmode in text editor).
>>      
> The .prj file that was decompiled from the TYP file follows the Windows .ini
> style.   The "PRJ file to MapEdit skin" produces something genTYP-like, but
> it lacks some information, such as Product ID and Family ID.
>
> I do not mind using a non-free TYP editor for now, but I would like to use
> a text format that can represent every aspect of the TYP file.  Later, if
> a better TYP editor is released as free software, we could convert the source
> files to the format of that editor if needed.
>
> I think that we could do with a simple text-to-TYP compiler.  I would
> implement it in Java, because users are likely to have the runtime
> environment installed already, for splitter, mkgmap and JOSM.
>
> For regression testing, we could have a set of TYP source files that would
> contain the MD5 checksum of the resulting binary in a comment.
>
> What do you think?  How are you storing your TYP files, Felix?  In the
> MapTk PRJ file format, or as binary files?
>    
I'm working from .prj MapTk files. It's the quickest way if you want to 
update several typfiles at the same time. I even think about moving to 
track or svn monitoring for the typfiles so that I only need to do my 
changes in one file.
I once or twice hat to go to backups after using ati.land as it 
destroyed my typfiles, and also like the maptk GUI editor (the only 
major problem is that is lacks a png import function). I also find the 
.prj format easier to understand/edit in texteditor in comparison to 
cgpsmapper/gentyp notation.

I never used night mode, but for in car use it is useful (or better said 
for non "topographic" maps that have few polygons but thick streets). I 
would support a text notation that one can at least for roads and 
polygons easily imagine - with genTYP format I do have problems 
imagining how it will look like once compiled.
> 	Marko
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>    




More information about the mkgmap-dev mailing list