baseline linestring interval calculation refactored