convertGeometryAndClipLineToTile

fun convertGeometryAndClipLineToTile(tileX: Int, tileY: Int, tileZoom: Int, line: ArrayList<Pair<Int, Int>>, interpolatedNodes: MutableList<LngLatAlt>): List<LineString>

convertGeometryAndClipLineToTile takes a line and converts it into a List of LineStrings. In the simplest case, the points are all within the tile and so there will just be a single LineString output. However, if the line goes off and on the tile (bouncing around in the buffer region) then there can be multiple segments returned. We also store all of the interpolated points that we've been created so that we can more easily connect them to the adjacent tiles in the grid.