[mkgmap-dev] DEM file and the block-size option

2017-12-26 Thread Gerd Petermann
Hi all, the current default block-size is 512. This is used for most *.img files and gives a maximum file size of 65534*512 ~ 32MB. For large DEM files you might need a --block-size=1024 or even 2048. If I got that right you may run into the next problem when using this option as the mdr file wil

Re: [mkgmap-dev] DEM file and the block-size option

2017-12-26 Thread Steve Ratcliffe
Hi Gerd It would be a lot better and that is what happens for the gmapsupp file. I should be able to make the code work for all IMG files. Steve > >@Steve: >If I got that right we should be able to calculate the optimal >block-size >as we do know the number of bytes that we will write to the i

Re: [mkgmap-dev] DEM file and the block-size option

2017-12-26 Thread Andrzej Popowski
Hi Gerd, > This disadvantage of a larger block-size is that your img files are > typically a bit larger. For small img yes. For bigger img larger block-size results in smaller img size, since FAT contains less records and is smaller. I think you simply could set block-size 2048 as default. -

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-06 Thread Gerd Petermann
Betreff: Re: [mkgmap-dev] DEM file and the block-size option Hi Gerd, > This disadvantage of a larger block-size is that your img files are > typically a bit larger. For small img yes. For bigger img larger block-size results in smaller img size, since FAT contains less records and is smal

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-06 Thread Andrzej Popowski
Hi Gerd, I have tested some img, changing block size with GMapTool. These are results, first original file size, then size delta for blocks 1k, 2k and 4k: 14.8k -- +3.6k +9.9k +22.0k 109k -- +2.6k +7.7k +16.9k 1M-- +0.0k +5.2k +17.7k 2M-- -1.6k -0.5k +10.7k 3M-- -3.6k

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-06 Thread Gerd Petermann
2018 20:39:12 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM file and the block-size option Hi Gerd, I have tested some img, changing block size with GMapTool. These are results, first original file size, then size delta for blocks 1k, 2k and 4k: 14.8k -- +3.6k +9.9k +

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-06 Thread Steve Ratcliffe
Hi Gerd not sure what to do here. I agree that 2048 looks like a good default, at least for DEM tiles. I am looking at this. I am going to remove all the existing code that writes the FAT tables as that needs to the block size before you start. The new code will calculate the best block

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-06 Thread Andrzej Popowski
Hi Gerd, > for MDR mkgmap sets the blocksize to 16384 if not set otherwise with > the block-size option: > params.setBlockSize(args.get("block-size", 16384)); I have seen this code. I think it is wrong to use the same option for tiles and index. Index can be very big regardless of tile size.

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-07 Thread Gerd Petermann
Hi Steve, thanks, sounds great. Gerd Von: mkgmap-dev im Auftrag von Steve Ratcliffe Gesendet: Samstag, 6. Januar 2018 22:58:46 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM file and the block-size option Hi Gerd > not sure what

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-12 Thread Andrzej Popowski
Hi, here is attached temporary fix for block-size. List of changes: * Default block size for img set to 1k. This allows for img up to 64MB. User can change this value with option --block-size. * Block size for overview map fixed at 1k. Not changeable by user. * Block size for MDR fixed at 16k.

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-13 Thread Steve Ratcliffe
Hi Andrzej - // There are 2 slots for the header itself. + // There are 2 slots for the header itself. (slots or blocks? code adds blocks) int blocksRequired = 2 + headerSlotsRequired * 512 / blockSize; It should be slots, the code is wrong. Also i

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-13 Thread Gerd Petermann
Von: mkgmap-dev im Auftrag von Steve Ratcliffe Gesendet: Samstag, 13. Januar 2018 15:21:18 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM file and the block-size option Hi Andrzej > - // There are 2 slots for the header itself. > + // There are 2 slot

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-13 Thread Andrzej Popowski
Hi, I got once overview bigger than 32M and I had to decrease DEM resolution. 64MB seems quite big for an overview. Anyway, I have provided this patch, because I have finally found the reason for big MDR sizes. I hope at least this one correction can be moved to trunk. -- Best regards, And

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-13 Thread Steve Ratcliffe
Hi Gerd @Steve: I see you are making progress in the auto-block branch. Please stop me if this patch causes trouble when merging. It is not a problem for me. It may be a while before the auto-block code is fully working and tested, so the patch will be useful in the mean time. ..Steve

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-13 Thread Henning Scholland
2018 15:21:18 > An: mkgmap-dev@lists.mkgmap.org.uk > Betreff: Re: [mkgmap-dev] DEM file and the block-size option > > Hi Andrzej > >> - // There are 2 slots for the header itself. >> + // There are 2 slots for the header itself. (slots or blocks? >

Re: [mkgmap-dev] DEM file and the block-size option

2018-01-13 Thread Gerd Petermann
treff: Re: [mkgmap-dev] DEM file and the block-size option For overview-map it would be fine for me, but for detailed map I need a block-size of 2k Henning On 13.01.2018 22:57, Gerd Petermann wrote: > Hi all, > > I hesitate to commit this patch because I think that some users create >