logo separator

[mkgmap-dev] EU map too big?

From Steve Ratcliffe steve at parabola.me.uk on Fri May 15 11:45:31 BST 2015


Hi

> "This definition implies that an IMG file can never have more than 65,535
> blocks, but
> the use of large block sizes (2048, 4096, etc…) allow the IMG file to hold
> several gigabytes of
> data. The only practical limit on IMG file size seems to be the use of
> 32-bit integers for file
> offsets, which imposes a hard limit of 4 GB.
> Large sub-files, those with more than 240 blocks of data, are spanned across
> multiple FAT
> blocks with each sub-file part numbered in a 32-bit integer at offset 0x10.
> File size is only
> present in the first of these (part 0x0000)."
>
> 65535 * 256 ~ 16BG, so I assume that this is the reason. I see files which
> use a different
> blocksize, so maybe this limit makes no more sense.
>
> @Steve: Can you have a look at this, please?

The img file as a whole can be very large by using a large block size
as the quoted passage states.  This is how we create the global index
and the gmapsupp files.

(We may not however automatically adjust the block size for regular
tiles, but that could be fixed if it became a problem.)

The bigger issue is the limits on the individual files (RGN etc)
within the .img file.  For example the subdivision pointers from TRE
into RGN are 3 byte quantities and so this means that the max possible
offset into RGN for the start of a subdivision is around 16M.

It is possible that there are flags that allows you to extend this,
but I don't know of any, nor have I seen any files that break this
limit.

..Steve


More information about the mkgmap-dev mailing list