
Good evening, I thought it would be enough to just search for the map ID in a .img file and replace it by a new one. Well, after some research I found out that this is not true. http://svn.parabola.me.uk/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/trergn/... I tried to check out TreCalc listed there, but it would not compile ... Would it be possible to change mkgmap that way that it supports in-file replacing of the map ID (without regenerating all stuff)? Simon

On 01/13/2010 09:14 PM, Simon Eugster wrote:
I thought it would be enough to just search for the map ID in a .img file and replace it by a new one. Well, after some research I found out that this is not true. http://svn.parabola.me.uk/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/trergn/... I tried to check out TreCalc listed there, but it would not compile ...
Would it be possible to change mkgmap that way that it supports in-file replacing of the map ID (without regenerating all stuff)?
Wgmaptool can do this.

Ralf Kleineisel wrote:
On 01/13/2010 09:14 PM, Simon Eugster wrote:
I thought it would be enough to just search for the map ID in a .img file and replace it by a new one. Well, after some research I found out that this is not true. http://svn.parabola.me.uk/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/trergn/... I tried to check out TreCalc listed there, but it would not compile ...
Would it be possible to change mkgmap that way that it supports in-file replacing of the map ID (without regenerating all stuff)?
Wgmaptool can do this.
Well ... Now my Python script can do it as well. I've mainly copied Steve's code (thank you!) and translated it to Python. It took some time (as you can see when you look when I sent this mail) to get everything right ... but now it is working :) $ python change-mapID.py 1000.img 12343210 Old map ID at fe00: 0x000003e8 = 1000 Header length: 188 Values: e1c63e9b ee9a3e9a eeee3e9a eeee3e9a (original) Values: 57c264ef 00d4649a 002864ee 002864ee (calculated) Have fun :) Simon
participants (2)
-
Ralf Kleineisel
-
Simon Eugster