Sign in

    geo

    MoonBit port of georust/geo: 2D planar geospatial primitives and algorithms

    gis
    geo
    geography
    geospatial
    Download zip
    Author
    Version
    0.1.3
    License
    MIT
    Last updated
    2 months ago
    Downloads
    61

    #@totto2727/geo

    @totto2727/geo lets MoonBit applications model two-dimensional spatial data, measure and transform shapes, make robust topology decisions, and query indexed locations. It is a port of georust/geo with dedicated packages for geometry values, algorithms, robust predicates, and R-tree indexing; coordinates use Double and 3D geometry is outside the module scope.

    #Usage

    After completing Setup, measure a triangular work area through the geometry-value and algorithm packages:

    ///|
    test "calculate a triangle area" {
    let triangle = @type.Triangle::Triangle(
    @type.Coord(0.0, 0.0),
    @type.Coord(4.0, 0.0),
    @type.Coord(0.0, 6.0),
    )
    inspect(@geo2d.HasArea::unsigned_area(triangle), content="12")
    }

    For package roles and API references, see 2D algorithms, geometry types, robust predicates, and the R-tree index.

    #Key features

    • totto2727/geo/geo/2d/type provides Coord, Point, LineString, Polygon, multi-geometries, Rect, Triangle, and Geometry.
    • totto2727/geo/geo/2d provides planar and geographic measurement, topology, transformation, simplification, boolean, triangulation, and clustering algorithms.
    • totto2727/geo/robust provides adaptive orient2d and incircle predicates for topology-sensitive operations.
    • totto2727/geo/rtree provides bulk loading, mutation, rectangle queries, nearest queries, and iteration over spatial entries.

    #Prerequisites

    • MoonBit: Install the MoonBit toolchain.

    #Setup

    1. Add totto2727/geo to the consumer project.

    moon add totto2727/geo@0.1.3

    1. Import the algorithm and geometry-type packages in the consumer package's moon.pkg.

    import { "totto2727/geo/geo/2d" @geo2d, "totto2727/geo/geo/2d/type" @type, }

    #API

    Mooncakes is the canonical generated API index. See the module page, 2D algorithms, geometry types, robust predicates, and R-tree pages.

    #Development

    For repository structure, development commands, and package documentation-test guidance, see AGENTS.md.

    #License

    MIT. See LICENSE.

    This README was generated from the share-artifact skill and README template.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io