DEM: performance with bicubic interpolation

Hi all, the bicubic interpolation that was introduced with r4072 is quite slow compared to bilinear interpolation. I have already changed the code to use a faster method in r4076 but you should still expect that run time for DEM calculation increases by up to ~100% compared to code r4071, actual values depend on hgt resolution and your dem-dists values. So, I wonder if I should add an option that allows to switch this - probably better - interpolation off or maybe add an option to switch it on so that faster interpolation is used by default. The differences in the map are rather small and may be smaller than the errros that come with the input hgt data. Gerd

Hi Gerd, there are different kind of bicubic interpolations. I'm not good at this math, I think the previous version was actually bicubic spline interpolation. See other possibilities here: http://mrl.nyu.edu/~perlin/cubic/Cubic_java.html I don't know, which type of spline or cubic interpolation is best for DEM. Maybe differences aren't big, but I think it is better to have good interpolation than fast one. You compile a map once but then many people can use it. It shouldn't be difficult to include an option like: --dem-interp=.. -- Best regards, Andrzej

Hi Andrzej, I also suggest to make interpolation optional. So far I don't understand your argument. I agree, compilation time is not the only criteria. The question is, what is the benefit for the user. For example: If accuracy of srtm is +- 10m and the difference between with/without interpolation is +-1m, then it's definitely not worth spending any effort on interpolation. Only in cases, where interpolation accuracy is on same level than srtm accuracy, it starting to be worth spending time for it. Do you have any values for differences with/without interpolation with same input data? Henning On 23.01.2018 20:22, Andrzej Popowski wrote:
Hi Gerd,
there are different kind of bicubic interpolations. I'm not good at this math, I think the previous version was actually bicubic spline interpolation. See other possibilities here: http://mrl.nyu.edu/~perlin/cubic/Cubic_java.html
I don't know, which type of spline or cubic interpolation is best for DEM. Maybe differences aren't big, but I think it is better to have good interpolation than fast one. You compile a map once but then many people can use it.
It shouldn't be difficult to include an option like: --dem-interp=..

For srtm I found elevation accuracy of 6m in wikipedia, so my 10m was not that unrealistic. Btw. We are talking about interpolating from hgt-data position to Garmin-data position, aren't we? For filling voids, it would be a good idea to use some spline interpolation as written here: https://en.wikipedia.org/wiki/Shuttle_Radar_Topography_Mission#Void-filled_S... Henning * * On 23.01.2018 20:59, Henning Scholland wrote:
Hi Andrzej,
I also suggest to make interpolation optional.
So far I don't understand your argument. I agree, compilation time is not the only criteria. The question is, what is the benefit for the user. For example: If accuracy of srtm is +- 10m and the difference between with/without interpolation is +-1m, then it's definitely not worth spending any effort on interpolation. Only in cases, where interpolation accuracy is on same level than srtm accuracy, it starting to be worth spending time for it.
Do you have any values for differences with/without interpolation with same input data?
Henning
On 23.01.2018 20:22, Andrzej Popowski wrote:
Hi Gerd,
there are different kind of bicubic interpolations. I'm not good at this math, I think the previous version was actually bicubic spline interpolation. See other possibilities here: http://mrl.nyu.edu/~perlin/cubic/Cubic_java.html
I don't know, which type of spline or cubic interpolation is best for DEM. Maybe differences aren't big, but I think it is better to have good interpolation than fast one. You compile a map once but then many people can use it.
It shouldn't be difficult to include an option like: --dem-interp=..
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Henning, yes, we have to scale hgt resolution to garmin resolution, this is not about voids. We may use the same algo to fill voids. I think this link is quite interesting: https://web.archive.org/web/20051024202307/http://www.geovista.psu.edu/sites... Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Henning Scholland <osm@hscholland.de> Gesendet: Dienstag, 23. Januar 2018 14:09:17 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation For srtm I found elevation accuracy of 6m in wikipedia, so my 10m was not that unrealistic. Btw. We are talking about interpolating from hgt-data position to Garmin-data position, aren't we? For filling voids, it would be a good idea to use some spline interpolation as written here: https://en.wikipedia.org/wiki/Shuttle_Radar_Topography_Mission#Void-filled_S... Henning On 23.01.2018 20:59, Henning Scholland wrote: Hi Andrzej, I also suggest to make interpolation optional. So far I don't understand your argument. I agree, compilation time is not the only criteria. The question is, what is the benefit for the user. For example: If accuracy of srtm is +- 10m and the difference between with/without interpolation is +-1m, then it's definitely not worth spending any effort on interpolation. Only in cases, where interpolation accuracy is on same level than srtm accuracy, it starting to be worth spending time for it. Do you have any values for differences with/without interpolation with same input data? Henning On 23.01.2018 20:22, Andrzej Popowski wrote: Hi Gerd, there are different kind of bicubic interpolations. I'm not good at this math, I think the previous version was actually bicubic spline interpolation. See other possibilities here: http://mrl.nyu.edu/~perlin/cubic/Cubic_java.html I don't know, which type of spline or cubic interpolation is best for DEM. Maybe differences aren't big, but I think it is better to have good interpolation than fast one. You compile a map once but then many people can use it. It shouldn't be difficult to include an option like: --dem-interp=.. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Maybe I'm thinking too scientific about it, but what benefit should be expected when using lower --dem-dist values then the source can provide? The interpolation is finally done by the Garmin software while displaying the elevation data. At least I'm getting more elevation data points in Basecamp then in the map. I'm using --dem-dist=9942 for 3" srtm and at least elevation plot in routing shows distances between points of less than 90m. Also while moving the mouse you can see a continues reduction of altitude. There are no jumps in mountainous area. So I don't see a reason to read 'rough' source data, making them theoretical more accurate (which isn't correct anyway, it's more guessing than knowing) and finally the interpolated values are interpolated again. Maybe it looks smoother, but it shouldn't be more accurate. So I doubt it's worth. Henning On 23.01.2018 22:05, Gerd Petermann wrote:
Hi Henning, yes, we have to scale hgt resolution to garmin resolution, this is not about voids.
We may use the same algo to fill voids. I think this link is quite interesting: https://web.archive.org/web/20051024202307/http://www.geovista.psu.edu/sites...
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Henning Scholland <osm@hscholland.de> Gesendet: Dienstag, 23. Januar 2018 14:09:17 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation
For srtm I found elevation accuracy of 6m in wikipedia, so my 10m was not that unrealistic.
Btw. We are talking about interpolating from hgt-data position to Garmin-data position, aren't we?
For filling voids, it would be a good idea to use some spline interpolation as written here: https://en.wikipedia.org/wiki/Shuttle_Radar_Topography_Mission#Void-filled_S...
Henning
On 23.01.2018 20:59, Henning Scholland wrote:
Hi Andrzej,
I also suggest to make interpolation optional.
So far I don't understand your argument. I agree, compilation time is not the only criteria. The question is, what is the benefit for the user. For example: If accuracy of srtm is +- 10m and the difference between with/without interpolation is +-1m, then it's definitely not worth spending any effort on interpolation. Only in cases, where interpolation accuracy is on same level than srtm accuracy, it starting to be worth spending time for it.
Do you have any values for differences with/without interpolation with same input data?
Henning
On 23.01.2018 20:22, Andrzej Popowski wrote:
Hi Gerd,
there are different kind of bicubic interpolations. I'm not good at this math, I think the previous version was actually bicubic spline interpolation. See other possibilities here: http://mrl.nyu.edu/~perlin/cubic/Cubic_java.html
I don't know, which type of spline or cubic interpolation is best for DEM. Maybe differences aren't big, but I think it is better to have good interpolation than fast one. You compile a map once but then many people can use it.
It shouldn't be difficult to include an option like: --dem-interp=..
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Andrzej, I think this code is optimized for the case that you use fillArray() once and calculate the interpolation with multiple different combinations of qx + qy. When you use e.g. a 3'' hgt file with dem-dists=9936,... this happens rarely. When you use the same file with dem-dists=2000 this algo is probable faster if we detect the cases where we can reuse the class and the filled array, but such a value doesn't make sense. Maybe it is also faster for a value like 4971 (9942/2), I did not try that because I thought that one should try to be close to the hgt res. See also http://www.paulinternet.nl/?page=bicubic where I found the simple code that is now used. It also offers a variant similar to the one from Ken Perlin. I'll try later if this code really improves throughput when users specifies small values for dem-dists. If that is not much faster I'd prefer to keep the rather simple code that is used now and rather tell the user that the dem-dists value is too small. To be honest, I am not sure if any value that is much smaller than the hgt resolution makes sense, as it just blows up DEM with interpolated values, but maybe I don't understand the math enough. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Dienstag, 23. Januar 2018 13:22:01 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation Hi Gerd, there are different kind of bicubic interpolations. I'm not good at this math, I think the previous version was actually bicubic spline interpolation. See other possibilities here: http://mrl.nyu.edu/~perlin/cubic/Cubic_java.html I don't know, which type of spline or cubic interpolation is best for DEM. Maybe differences aren't big, but I think it is better to have good interpolation than fast one. You compile a map once but then many people can use it. It shouldn't be difficult to include an option like: --dem-interp=.. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd and Henning,
If accuracy of srtm is +- 10m and the difference between with/without interpolation is +-1m, then it's definitely not worth spending any effort on interpolation.
This is not like interpolations error is placed within source data error. This error is added to data error. I believe it can be much bigger, especially in case of 3" HGT. This could be tested. Apart of height error, there is a problem of DEM shape. I mean the exact places where is a peak of a mountain or heights points in a profile of a route. With simple interpolation, there probably would be much bigger positional error. I have read reports, that increasing DEM resolution above HGT resolution increases DEM quality. But this was opinion about bilinear interpolation, maybe there is no need for such a settings with better interpolation? -- Best regards, Andrzej

Hi Gerd, maybe we can wait a bit with optimization? What I would like to get is an option for mkgamp, that will allow for testing quality of all these versions of interpolation. For now we have bilinear, bicubic and bicubic spline. This all could be included in code and selected by user. -- Best regards, Andrzej

Hi Andrzej, okay, I'll try to add such an option. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Dienstag, 23. Januar 2018 16:28:26 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation Hi Gerd, maybe we can wait a bit with optimization? What I would like to get is an option for mkgamp, that will allow for testing quality of all these versions of interpolation. For now we have bilinear, bicubic and bicubic spline. This all could be included in code and selected by user. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd and Andrzej I think that makes sense top make it more flexible. I found the following interpolation NearestNeighbor Bilinear BicubicCardinal BicubicBSpline BicubicBCSpline Nick On 23/01/2018 15:28, Andrzej Popowski wrote:
Hi Gerd,
maybe we can wait a bit with optimization? What I would like to get is an option for mkgamp, that will allow for testing quality of all these versions of interpolation. For now we have bilinear, bicubic and bicubic spline. This all could be included in code and selected by user.

Hi all, see http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4081 Please ignore run time of bicubic-spline method for now, I think optimized version should be as slow as bicubic, at the moment it is slower. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von osm@pinns <osm@pinns.co.uk> Gesendet: Dienstag, 23. Januar 2018 17:16:17 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation Hi Gerd and Andrzej I think that makes sense top make it more flexible. I found the following interpolation NearestNeighbor Bilinear BicubicCardinal BicubicBSpline BicubicBCSpline Nick On 23/01/2018 15:28, Andrzej Popowski wrote:
Hi Gerd,
maybe we can wait a bit with optimization? What I would like to get is an option for mkgamp, that will allow for testing quality of all these versions of interpolation. For now we have bilinear, bicubic and bicubic spline. This all could be included in code and selected by user.
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, thanks for option. I have prepared a set for tests: http://files.mkgmap.org.uk/download/407/interpolation.7z This set creates maps with different resolutions and interpolations. I have created a direct route and compared height profiles created with different maps. Here my observations: - I can't see any difference between bicubic and bicubic-spline. - Oversampling with DEM resolution twice the resolution of HGT improve look of height profile. It improves shading too. - I have looked at maximum and minimum height of profile. I noticed differences in range 2-6m between bilinear and bicubic interpolation for 3" HGT. My suggestion: use bicubic version. If size is not a problem, try some oversampling. -- Best regards, Andrzej

Hi Andrzej, I think you don't see a difference between bicubic and bicubic-spline because your script uses the same option bicubic for both ;-) Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Dienstag, 23. Januar 2018 22:17:21 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation Hi Gerd, thanks for option. I have prepared a set for tests: http://files.mkgmap.org.uk/download/407/interpolation.7z This set creates maps with different resolutions and interpolations. I have created a direct route and compared height profiles created with different maps. Here my observations: - I can't see any difference between bicubic and bicubic-spline. - Oversampling with DEM resolution twice the resolution of HGT improve look of height profile. It improves shading too. - I have looked at maximum and minimum height of profile. I noticed differences in range 2-6m between bilinear and bicubic interpolation for 3" HGT. My suggestion: use bicubic version. If size is not a problem, try some oversampling. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, thanks for noticing :) I hope anyone testing these maps will correct options for bicubic-spline. Now there is a difference. Bicubic-spline looks more smooth than bilinear, but the heights of peaks is lower, which is unexpected. So again, bicubic looks the best. -- Best regards, Andrzej

Hi, I have added more algorithms for testing, patch is attached. Patched mkgmap recognize following values for x-dem-interpolation: bilinear bicubic bicubic-spline bicubic-catmull bicubic-hermite I have prepared new set for testing: http://files.mkgmap.org.uk/download/408/interpolation2.7z For me bicubic-catmull looks like bicubic. Bicubic-spline looks inferior and bicubic-hermite gives weird results, maybe something is wrong. Still bicubic interpolation looks the best. -- Best regards, Andrzej

Hi Andrzej, yes, your original patch dem-align-6.patch implements bicubic-catmull and the faster replacement by Paul Breeuwsma does that as well. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Mittwoch, 24. Januar 2018 13:45 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation Hi, I have added more algorithms for testing, patch is attached. Patched mkgmap recognize following values for x-dem-interpolation: bilinear bicubic bicubic-spline bicubic-catmull bicubic-hermite I have prepared new set for testing: http://files.mkgmap.org.uk/download/408/interpolation2.7z For me bicubic-catmull looks like bicubic. Bicubic-spline looks inferior and bicubic-hermite gives weird results, maybe something is wrong. Still bicubic interpolation looks the best. -- Best regards, Andrzej

Hi Gerd, maybe someone will add more input to this discussion, but for me now following solution make sens: provide option dem-interplation with 3 values: - bilinear - fast interpolation for all layers, - bicubic - precise interpolation for all layers, - auto - default settings - automatically switching between bilinear and bicubic, depending on DEM and HGT resolution. -- Best regards Andrzej

Hi all, I like Andrzejs suggestion and created a patch that implements and documents the option like this: --dem-interpolation=value Use this option to speciy the method that is used to interpolate data from hgt raster to the DEM raster. The value bicubic gives the highest precision but is slower, bilinear is faster but less precise, it tends to smooth the profile and thus also reduces DEM size compared to bicubic. The value auto means that bicubic is used where is seems appropriate according to hgt resolution and dem-dist value, else bilinear is used. If not given, the default is auto. Please suggest improvements, else I'll commit that tomorrow. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Mittwoch, 24. Januar 2018 14:57 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation Hi Gerd, maybe someone will add more input to this discussion, but for me now following solution make sens: provide option dem-interplation with 3 values: - bilinear - fast interpolation for all layers, - bicubic - precise interpolation for all layers, - auto - default settings - automatically switching between bilinear and bicubic, depending on DEM and HGT resolution. -- Best regards Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd I'm a bit confused when you mentioned value as that seems to imply a number? Just to clarify : the options are: --dem-interpolation=auto or bilateral or bicubic ? Nick On 24/01/2018 15:10, Gerd Petermann wrote:
Hi all,
I like Andrzejs suggestion and created a patch that implements and documents the option like this:
--dem-interpolation=value Use this option to speciy the method that is used to interpolate data from hgt raster to the DEM raster. The value bicubic gives the highest precision but is slower, bilinear is faster but less precise, it tends to smooth the profile and thus also reduces DEM size compared to bicubic. The value auto means that bicubic is used where is seems appropriate according to hgt resolution and dem-dist value, else bilinear is used. If not given, the default is auto.
Please suggest improvements, else I'll commit that tomorrow.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl> Gesendet: Mittwoch, 24. Januar 2018 14:57 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation
Hi Gerd,
maybe someone will add more input to this discussion, but for me now following solution make sens: provide option dem-interplation with 3 values: - bilinear - fast interpolation for all layers, - bicubic - precise interpolation for all layers, - auto - default settings - automatically switching between bilinear and bicubic, depending on DEM and HGT resolution.
-- Best regards Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Nick, is that so? I'll change it to --dem-interpolation=auto|bicubic|bilinear Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von osm@pinns <osm@pinns.co.uk> Gesendet: Mittwoch, 24. Januar 2018 16:52 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation Hi Gerd I'm a bit confused when you mentioned value as that seems to imply a number? Just to clarify : the options are: --dem-interpolation=auto or bilateral or bicubic ? Nick On 24/01/2018 15:10, Gerd Petermann wrote: Hi all, I like Andrzejs suggestion and created a patch that implements and documents the option like this: --dem-interpolation=value Use this option to speciy the method that is used to interpolate data from hgt raster to the DEM raster. The value bicubic gives the highest precision but is slower, bilinear is faster but less precise, it tends to smooth the profile and thus also reduces DEM size compared to bicubic. The value auto means that bicubic is used where is seems appropriate according to hgt resolution and dem-dist value, else bilinear is used. If not given, the default is auto. Please suggest improvements, else I'll commit that tomorrow. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk><mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl><mailto:popej@poczta.onet.pl> Gesendet: Mittwoch, 24. Januar 2018 14:57 An: mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation Hi Gerd, maybe someone will add more input to this discussion, but for me now following solution make sens: provide option dem-interplation with 3 values: - bilinear - fast interpolation for all layers, - bicubic - precise interpolation for all layers, - auto - default settings - automatically switching between bilinear and bicubic, depending on DEM and HGT resolution. -- Best regards Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd Perhaps I'm too fussy differating between values per se and string values Anyway, the --dem-interpolation seems a very good idea with a chance to add more types of interpolation when available. Nick On 24/01/2018 15:57, Gerd Petermann wrote:
Hi Nick,
is that so? I'll change it to --dem-interpolation=auto|bicubic|bilinear
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von osm@pinns <osm@pinns.co.uk> Gesendet: Mittwoch, 24. Januar 2018 16:52 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation
Hi Gerd
I'm a bit confused when you mentioned value as that seems to imply a number?
Just to clarify :
the options are:
--dem-interpolation=auto or bilateral or bicubic ?
Nick
On 24/01/2018 15:10, Gerd Petermann wrote:
Hi all,
I like Andrzejs suggestion and created a patch that implements and documents the option like this:
--dem-interpolation=value Use this option to speciy the method that is used to interpolate data from hgt raster to the DEM raster. The value bicubic gives the highest precision but is slower, bilinear is faster but less precise, it tends to smooth the profile and thus also reduces DEM size compared to bicubic. The value auto means that bicubic is used where is seems appropriate according to hgt resolution and dem-dist value, else bilinear is used. If not given, the default is auto.
Please suggest improvements, else I'll commit that tomorrow.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk><mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej@poczta.onet.pl><mailto:popej@poczta.onet.pl> Gesendet: Mittwoch, 24. Januar 2018 14:57 An: mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> Betreff: Re: [mkgmap-dev] DEM: performance with bicubic interpolation
Hi Gerd,
maybe someone will add more input to this discussion, but for me now following solution make sens: provide option dem-interplation with 3 values: - bilinear - fast interpolation for all layers, - bicubic - precise interpolation for all layers, - auto - default settings - automatically switching between bilinear and bicubic, depending on DEM and HGT resolution.
-- Best regards Andrzej _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (5)
-
Andrzej Popowski
-
Gerd Petermann
-
Gerd Petermann
-
Henning Scholland
-
osm@pinns