Skip to content

Repository files navigation

Parcel Geometry Engine

A high-performance Rust library and CLI for land parcel overlap and boundary analysis.

Features

  • Geometry Primitives: Robust Point, Line, and Polygon implementations.
  • Spatial Analysis: Calculate Area, Perimeter, and check for Intersections/Overlaps.
  • Topological validation: Ensure polygons are valid (closed, no self-intersections).
  • Fast: Built with Rust for maximum performance.
  • Cross-platform: Runs on Windows, Linux, and macOS.

Building the Project

To build the project, run:

cargo build --release

To run the tests:

cargo test

CLI Usage

The project includes a Command Line Interface (CLI) for easy interaction.

1. Analyze a Geometry file

Calculates area, perimeter, and validates the topology.

cargo run -- analyze --path <path_to_file>

Example:

cargo run -- analyze --path sample_parcel.geojson

2. Compare two Geometries

Checks if two polygons intersect or overlap.

cargo run -- compare --poly1 <file1.geojson> --poly2 <file2.geojson>

Generating Sample Data

A Python script is provided to generate random, valid GeoJSON polygons for testing.

Prerequisites

  • Python 3.x installed

Usage

Generate a single random polygon:

python scripts/generate_data.py --output my_parcel.geojson

Generate a feature collection with 10 random parcels:

python scripts/generate_data.py --output city_parcels.geojson --count 10

About

High-performance Rust library for land parcel geometry, overlap detection, and boundary analysis.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages