/TS-Concave-Hull

A Typescript implementation of the Park and Oh (2012) algorithm (derived from concaveman)

Primary LanguageTypeScriptApache License 2.0Apache-2.0

TypeScript Concave Hull

This is a TypeScript implementation of the concave hull algorithm described in Park and Oh (Journal of Information Science and Engineering, 2012). This code base was derived from a Javscript implementation of the above algorithm, concaveman, which can be found at this repo.

Several of the concaveman dependencies were also hand-ported to TypeScript. So, you will see RBush https://www.npmjs.com/package/rbush renamed and ported as RTree in the current implementation. The current RTree implementation is not templatized; it is optimized for use in the concave hull algorithm.

NOTE: This repo is no longer active. The Concave Hull has been updated and moved to the AMYR Library. This repo is left open for historical purposes.

Author: Jim Armstrong - The Algorithmist

@algorithmist

theAlgorithmist [at] gmail [dot] com

Typescript: 3.8.3

Jest: 25.2.1

Version: 1.0

Installation

Installation involves all the usual suspects

  • npm installed globally
  • Clone the repository
  • npm install
  • get coffee (this is the most important step)

Building and running the tests

  1. npm t (it really should not be this easy, but it is)

  2. Standalone compilation only (npm build)

Specs (hull.spec.ts) reside in the tests folder.

Notes

This is a beta implementation of the TypeScript port. The goal is to produce an implementation with well-defined typings for all variables and to work in an Angular environment with strict null checks.

Expect the code to be incrementally updated over time. It will also be compiled with TypeScript 4.0+ in a future release.

License

Apache 2.0

Free Software? Yeah, Homey plays that