Closed ThijsdeJong-TomTom closed 10 months ago
While working with some OSM border data as a polygon I encountered a segmentation fault while using osmium extract.
osmium extract
See example values
m_dy = (y_max() - y_min()) / num_bands 3811 = (437903881 - 399786994) / 10000
In this case m_dy would be 3811.6887 if it were not an int32_t. The result of this is that m_dy can cause band_max to go over the initially set max_bands by 1.
3811.6887
int32_t
m_dy
band_max
max_bands
(437903881 - 399786994) / 3811 = 10001.8071372
This fixes that by "rounding" m_dy.
While working with some OSM border data as a polygon I encountered a segmentation fault while using
osmium extract
.See example values
In this case m_dy would be
3811.6887
if it were not anint32_t
. The result of this is thatm_dy
can causeband_max
to go over the initially setmax_bands
by 1.This fixes that by "rounding"
m_dy
.