Code for the hexagonal quantization algorithm for cartographic line simplification