[mkgmap-dev] EU map too big?
From Gerd Petermann gpetermann_muenchen at hotmail.com on Sat May 16 10:33:36 BST 2015
Hi Steve, thanks for the clarification. I first thought that the 16MB limit is for the *.img file, but in fact it is for each subfile (RGN,LBL,...) within one *.img file. I played a bit with the limits and noticed that we don't even reach the 16 MB when the "too large" message appears because we use 128 KB steps to enlarge the buffer. FWIW : Attached is a small patch to fix that, it still uses the "1 KB GUARD_SIZE". (With the patch) I can safely create an *.img file that has ~ 18 MB, while the RGN file size is 0xfebfb9, which is still below the limit. Do you think it's okay to commit that? Gerd > Date: Fri, 15 May 2015 11:45:31 +0100 > From: steve at parabola.me.uk > To: mkgmap-dev at lists.mkgmap.org.uk > Subject: Re: [mkgmap-dev] EU map too big? > > > > 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 > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20150516/3ff03b20/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: 16mb-limit-v1.patch Type: application/octet-stream Size: 841 bytes Desc: not available URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20150516/3ff03b20/attachment-0001.obj>
- Previous message: [mkgmap-dev] EU map too big?
- Next message: [mkgmap-dev] Commit: r3591: enable merge lines when creating the overview map.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list