Re: [mkgmap-dev] Overview Too Big
HI Gerd, Your changes look fine to me. Changing the BufferedImgFileWriter constructor is a good suggestion, as it only needs half a dozen or so callers to be changed. Please see an updated patch attached - I have also improved the DEM error handling. Cheers, Mike -Original Message- From: Gerd Petermann [mailto:gpetermann_muenc...@hotmail.com] Sent: 02 March 2021 10:51 To: Development list for mkgmap Subject: Re: [mkgmap-dev] Overview Too Big Hi Mike, I've changed a few things, see attachment. - more section names which might be too big. Maybe it is possible to have a NET or NOD section that is bigger than RGN, I really don't know. - add "bytes" to message - use as much of the allowed size as possible (not sure what to do with the GUARD_SIZE. We report e.g. 16777215 bytes (16MB) but in fact we use something like 16777215 - 1024 = 16776191 bytes. I think I prefer to change the constructor for BufferedImgFileWriter to pass the section name instead of extracting it from the stacktrace. Did you consider this? Gerd Von: mkgmap-dev im Auftrag von Mike Baggaley Gesendet: Sonntag, 28. Februar 2021 17:38 An: 'Development list for mkgmap' Betreff: Re: [mkgmap-dev] Overview Too Big Hi Gerd, Please find attached an updated patch. I'm not sure whether what I've done is exactly what you intended - it now includes the img file name and the MDR/RGN/TRE subfile that has exceeded the size limit in the error message. I couldn't see a clean easy way to get at the subfile without amending every sub file handler, so have resorted to examining the stack trace. I've also changed the keep going handling to what works for me and seems more logical. Let me know if you think it is not quite right. Cheers, Mike -Original Message- From: Mike Baggaley [mailto:m...@tvage.co.uk] Sent: 24 February 2021 13:59 To: 'Development list for mkgmap' Subject: RE: [mkgmap-dev] Overview Too Big Hi Gerd, I'll have a look at that. The patch catches the low level error and re-throws in at a higher level in the case of the overview map. It will need to do the same for the main map. I notice that when the map is too big, processing does not stop, even though I have not got --keep-going set. Looking at the code, it seems that the keep going check is in the Throwable catcher, rather than the MapFailedException catcher. Is this intended or a mistake? It seems to me that you'd be unlikely to want to continue from some random error, but might want to if the problem was known to be related to just one map. Cheers, Mike -Original Message- From: Gerd Petermann [mailto:gpetermann_muenc...@hotmail.com] Sent: 24 February 2021 09:30 To: Development list for mkgmap Subject: Re: [mkgmap-dev] Overview Too Big Hi Mike, I agree that the message should be improved. In fact I am always unsure what kind of limit this is. I've just created a working single tile map of Berlin including NOD which has a filesize of > 21MB. Your patch reports a number which probably counts bytes (I miss that info), but I think it is not about tile/map size. I assume it is about max. sub file size. So, maybe show that sub file name also? Gerd Von: mkgmap-dev im Auftrag von Mike Baggaley Gesendet: Mittwoch, 24. Februar 2021 00:16 An: 'Development list for mkgmap' Betreff: [mkgmap-dev] Overview Too Big Hi Gerd, The error message that mkgmap outputs when the overview map is too big is not helpful. Please find attached a patch that improves this. Cheers, Mike OverviewTooBig4.patch Description: Binary data ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] Overview Too Big
Hi Mike, I've changed a few things, see attachment. - more section names which might be too big. Maybe it is possible to have a NET or NOD section that is bigger than RGN, I really don't know. - add "bytes" to message - use as much of the allowed size as possible (not sure what to do with the GUARD_SIZE. We report e.g. 16777215 bytes (16MB) but in fact we use something like 16777215 - 1024 = 16776191 bytes. I think I prefer to change the constructor for BufferedImgFileWriter to pass the section name instead of extracting it from the stacktrace. Did you consider this? Gerd Von: mkgmap-dev im Auftrag von Mike Baggaley Gesendet: Sonntag, 28. Februar 2021 17:38 An: 'Development list for mkgmap' Betreff: Re: [mkgmap-dev] Overview Too Big Hi Gerd, Please find attached an updated patch. I'm not sure whether what I've done is exactly what you intended - it now includes the img file name and the MDR/RGN/TRE subfile that has exceeded the size limit in the error message. I couldn't see a clean easy way to get at the subfile without amending every sub file handler, so have resorted to examining the stack trace. I've also changed the keep going handling to what works for me and seems more logical. Let me know if you think it is not quite right. Cheers, Mike -Original Message- From: Mike Baggaley [mailto:m...@tvage.co.uk] Sent: 24 February 2021 13:59 To: 'Development list for mkgmap' Subject: RE: [mkgmap-dev] Overview Too Big Hi Gerd, I'll have a look at that. The patch catches the low level error and re-throws in at a higher level in the case of the overview map. It will need to do the same for the main map. I notice that when the map is too big, processing does not stop, even though I have not got --keep-going set. Looking at the code, it seems that the keep going check is in the Throwable catcher, rather than the MapFailedException catcher. Is this intended or a mistake? It seems to me that you'd be unlikely to want to continue from some random error, but might want to if the problem was known to be related to just one map. Cheers, Mike -Original Message- From: Gerd Petermann [mailto:gpetermann_muenc...@hotmail.com] Sent: 24 February 2021 09:30 To: Development list for mkgmap Subject: Re: [mkgmap-dev] Overview Too Big Hi Mike, I agree that the message should be improved. In fact I am always unsure what kind of limit this is. I've just created a working single tile map of Berlin including NOD which has a filesize of > 21MB. Your patch reports a number which probably counts bytes (I miss that info), but I think it is not about tile/map size. I assume it is about max. sub file size. So, maybe show that sub file name also? Gerd Von: mkgmap-dev im Auftrag von Mike Baggaley Gesendet: Mittwoch, 24. Februar 2021 00:16 An: 'Development list for mkgmap' Betreff: [mkgmap-dev] Overview Too Big Hi Gerd, The error message that mkgmap outputs when the overview map is too big is not helpful. Please find attached a patch that improves this. Cheers, Mike OverviewTooBig3.patch Description: OverviewTooBig3.patch ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] Overview Too Big
Hi Gerd, Please find attached an updated patch. I'm not sure whether what I've done is exactly what you intended - it now includes the img file name and the MDR/RGN/TRE subfile that has exceeded the size limit in the error message. I couldn't see a clean easy way to get at the subfile without amending every sub file handler, so have resorted to examining the stack trace. I've also changed the keep going handling to what works for me and seems more logical. Let me know if you think it is not quite right. Cheers, Mike -Original Message- From: Mike Baggaley [mailto:m...@tvage.co.uk] Sent: 24 February 2021 13:59 To: 'Development list for mkgmap' Subject: RE: [mkgmap-dev] Overview Too Big Hi Gerd, I'll have a look at that. The patch catches the low level error and re-throws in at a higher level in the case of the overview map. It will need to do the same for the main map. I notice that when the map is too big, processing does not stop, even though I have not got --keep-going set. Looking at the code, it seems that the keep going check is in the Throwable catcher, rather than the MapFailedException catcher. Is this intended or a mistake? It seems to me that you'd be unlikely to want to continue from some random error, but might want to if the problem was known to be related to just one map. Cheers, Mike -Original Message- From: Gerd Petermann [mailto:gpetermann_muenc...@hotmail.com] Sent: 24 February 2021 09:30 To: Development list for mkgmap Subject: Re: [mkgmap-dev] Overview Too Big Hi Mike, I agree that the message should be improved. In fact I am always unsure what kind of limit this is. I've just created a working single tile map of Berlin including NOD which has a filesize of > 21MB. Your patch reports a number which probably counts bytes (I miss that info), but I think it is not about tile/map size. I assume it is about max. sub file size. So, maybe show that sub file name also? Gerd Von: mkgmap-dev im Auftrag von Mike Baggaley Gesendet: Mittwoch, 24. Februar 2021 00:16 An: 'Development list for mkgmap' Betreff: [mkgmap-dev] Overview Too Big Hi Gerd, The error message that mkgmap outputs when the overview map is too big is not helpful. Please find attached a patch that improves this. Cheers, Mike OverviewTooBig2.patch Description: Binary data ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] Overview Too Big
Hi Gerd, I'll have a look at that. The patch catches the low level error and re-throws in at a higher level in the case of the overview map. It will need to do the same for the main map. I notice that when the map is too big, processing does not stop, even though I have not got --keep-going set. Looking at the code, it seems that the keep going check is in the Throwable catcher, rather than the MapFailedException catcher. Is this intended or a mistake? It seems to me that you'd be unlikely to want to continue from some random error, but might want to if the problem was known to be related to just one map. Cheers, Mike -Original Message- From: Gerd Petermann [mailto:gpetermann_muenc...@hotmail.com] Sent: 24 February 2021 09:30 To: Development list for mkgmap Subject: Re: [mkgmap-dev] Overview Too Big Hi Mike, I agree that the message should be improved. In fact I am always unsure what kind of limit this is. I've just created a working single tile map of Berlin including NOD which has a filesize of > 21MB. Your patch reports a number which probably counts bytes (I miss that info), but I think it is not about tile/map size. I assume it is about max. sub file size. So, maybe show that sub file name also? Gerd Von: mkgmap-dev im Auftrag von Mike Baggaley Gesendet: Mittwoch, 24. Februar 2021 00:16 An: 'Development list for mkgmap' Betreff: [mkgmap-dev] Overview Too Big Hi Gerd, The error message that mkgmap outputs when the overview map is too big is not helpful. Please find attached a patch that improves this. Cheers, Mike ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Re: [mkgmap-dev] Overview Too Big
Hi Mike, I agree that the message should be improved. In fact I am always unsure what kind of limit this is. I've just created a working single tile map of Berlin including NOD which has a filesize of > 21MB. Your patch reports a number which probably counts bytes (I miss that info), but I think it is not about tile/map size. I assume it is about max. sub file size. So, maybe show that sub file name also? Gerd Von: mkgmap-dev im Auftrag von Mike Baggaley Gesendet: Mittwoch, 24. Februar 2021 00:16 An: 'Development list for mkgmap' Betreff: [mkgmap-dev] Overview Too Big Hi Gerd, The error message that mkgmap outputs when the overview map is too big is not helpful. Please find attached a patch that improves this. Cheers, Mike ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
[mkgmap-dev] Overview Too Big
Hi Gerd, The error message that mkgmap outputs when the overview map is too big is not helpful. Please find attached a patch that improves this. Cheers, Mike OverviewTooBig.patch Description: Binary data ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev