Package-level declarations

Types

Link copied to clipboard
data class EntranceDetails(val name: String?, val entranceType: String?, val poi: Boolean, val osmId: Double)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class IntersectionDetails(val name: String, val type: String, val subClass: String, val brunnel: String, val id: Double, var lineEnd: Boolean = false)
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun calculateSlope(aConst: Double, a1: Double, a2: Double): Double?
Link copied to clipboard
fun convertGeometry(tileX: Int, tileY: Int, tileZoom: Int, geometry: ArrayList<Pair<Int, Int>>): ArrayList<LngLatAlt>
Link copied to clipboard
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.

Link copied to clipboard
fun getTileCrossingPoint(point1: Pair<Int, Int>, point2: Pair<Int, Int>): List<Pair<Double, Double>>

getTileCrossingPoint returns the point at which the line connecting lastPoint and point crosses the tile boundary. If both points are outside the tile there can be two intersection points returned. Otherwise there can only be a single intersection point.

Link copied to clipboard
fun intersectHorizontal(yConst: Double, x1: Double, x2: Double, y1: Double, y2: Double): Double?
Link copied to clipboard
fun intersectVertical(xConst: Double, y1: Double, y2: Double, x1: Double, x2: Double): Double?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

translateProperties takes the properties stored in the MVT and translates them into a set of foreign properties that nearer matches those returned by the soundscape-backend.

Link copied to clipboard
fun vectorTileToGeoJson(tileX: Int, tileY: Int, mvt: <Error class: unknown class>, cropPoints: Boolean = true, tileZoom: Int = ZOOM_LEVEL): FeatureCollection

vectorTileToGeoJson generates a GeoJSON FeatureCollection from a Mapbox Vector Tile.