#geospatial #geographic #point #line #lat #function #polyline

geo-core

Common tools for working with spatial data

5 releases

0.1.4 May 14, 2024
0.1.3 May 14, 2024
0.1.2 May 14, 2024
0.1.1 May 13, 2024
0.1.0 May 13, 2024

#65 in Geospatial

Download history 348/week @ 2024-05-10 55/week @ 2024-05-17 4/week @ 2024-05-24

407 downloads per month

MIT/Apache

30KB
782 lines

Rust

geo-core-rs

Library of common geographic functions and tools in Rust

Point

  • Create points from XY
  • Create point from Lat Lng
  • Add Point
  • Subtract point

Line

  • Create line from 2 points
  • Get Length
  • Get Centroid
  • Get Bounding Box

Polyline

  • Create polyline from points
  • Create polyline from lines
  • Get Length
  • Get Centroid
  • Get Vertices (Array of Points)
  • Get Number of vertices
  • Get Bounding Box
  • Get Edges (Array of Lines)
  • Get Number of edges
  • Check if closed chain of lines (i.e. a polygon)

Polygon

  • Create Polygon from points
  • Get Vertices (Array of Points)
  • Get Number of Edges
  • Get Perimeter (length)
  • Get Area
  • Get Bounding Box
  • Check if closed chain.

Utilities

  • Convert degrees to radians
  • Convert radians to degrees
  • Point To Point Distance Cosine (Geographic)
  • Point To Point Distance Haversine (Geographic)
  • Point To Point Distance (Cartesian)
  • Point to Rectangle Distance (Cartesian)
  • Point to Rectangle Distance (Geographic)
  • Point to Line Distance (Cartesian)
  • Point to Line Distance (Geographic)
  • Mid point of two points (Geographic)
  • Find bearing between start and end point (Geographic)
  • Find cross track min distance between a great arc and another point (Geographic)

No runtime deps