Skip to content

hudsonb/turf.kt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

turf.kt

Advanced, cross platform, geospatial analysis for Kotlin.

turf.kt is a multi-platform Kotlin library for spatial analysis based on Turf .

turf.kt uses GeoJSON data classes provided by the geojson.kt project. turf.kt expects the data to be standard WGS84 longitude, latitude coordinates. Check out geojson.io for a tool to easily create this data.

Progress

The list below outlines the Turf functions which currently exist within turf.kt:

Measurement

  • along
  • area
  • bbox
  • bboxPolygon -> BBox:toPolygon
  • bearing
  • center
  • centerOfMass
  • centroid
  • destination
  • distance
  • envelope
  • length
  • midpoint
  • pointOnFeature
  • polygonTangents
  • pointToLineDistance
  • rhumbBearing
  • rhumbDestination
  • rhumbDistance
  • square
  • greatCircle

Coordinate Mutation

  • cleanCoords -> clean
  • flip
  • rewind
  • round Use Kotlin's round
  • truncate

Transformation

  • bboxClip
  • bezierSpline
  • buffer
  • circle
  • clone Use copy
  • concave
  • convex
  • difference
  • dissolve
  • intersect
  • lineOffset
  • simplify
  • tesselate
  • transformRotate
  • transformTranslate
  • transformScale
  • union
  • voronoi

Feature Conversion

  • combine
  • explode
  • flatten
  • lineToPolygon
  • polygonize
  • polygonToLine

Misc

  • kinks
  • lineArc -> arc
  • lineChunk
  • lineIntersect
  • lineOverlap
  • lineSegment -> segment
  • lineSlice
  • lineSliceAlong
  • lineSplit
  • mask
  • nearestPointOnLine
  • sector
  • shortestPath
  • unkinkPolygon

Helper

See geojson.kt.

Random

  • randomPosition
  • randomPoint
  • randomLineString
  • randomPolygon

Data

  • sample

Interpolation

  • interpolate
  • isobands
  • isolines
  • planepoint
  • tin

Joins

  • pointsWithinPolygon
  • tag

Grids

  • hexGrid
  • pointGrid
  • squareGrid
  • triangleGrid

Classification

  • nearestPoint

Aggregation

  • collect
  • clustersDbScan
  • clustersKMeans

Meta

  • coordAll
  • coordEach
  • coordReduce
  • featureEach
  • featureReduce
  • flattenEach
  • flattenReduce
  • getCoord
  • getCoords
  • getGeom
  • getType
  • geomEach
  • geomReduce
  • propEach
  • propReduce
  • segmentEach
  • segmentReduce
  • getCluster
  • clusterEach
  • clusterReduce

Assertions

See geojson.kt

Booleans

  • booleanClockwise -> isClockwise()/isCounterClockwise()
  • booleanContains
  • booleanCrosses
  • booleanDisjoint
  • booleanEqual -> ==, !=
  • booleanOverlap
  • booleanParallel
  • booleanPointInPolygon
  • booleanPointOnLine
  • booleanWithin

Unit Conversion

  • bearingToAzimuth
  • convertArea
  • convertLength
  • degreesToRadians -> Double.toRadians()
  • lengthToRadians
  • lengthToDegrees
  • radiansToLength
  • radiansToDegrees -> Double.toDegrees()
  • toMercator
  • toWgs84

Releases

No releases published

Packages

No packages published

Languages