Skip to content
Calculate the convex hull for a set of latitudes and longitudes.
JavaScript
Branch: master
Clone or download
Latest commit 294fca0 Aug 15, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
geo-convex-hull.js
package.json

README.md

geo-convex-hull

This module provides a function to determine the convex hull for a set of geographical coordinates (latitude and longitude). Units should be in degrees.

The return value is an array of latitude and longitude coordinates.

Example

var calculateConvexHull = require('geo-convex-hull')

var points = [
  {
    latitude: 33.4255,
    longitude: -111.9400
  }, 
  {
    latitude: 43.6187,
    longitude: -116..2146
  },
  {
    latitude: 39.8066,
    longitude: -101.0421
  }
]

var convexHull = calculateConvexHull(points);

Attribution

Taken with minimal modifications from here: https://github.com/Leaflet/Leaflet.markercluster/blob/master/src/MarkerCluster.QuickHull.js

You can’t perform that action at this time.