Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Geojson Area | 89 | 2,198 | 65 | 5 years ago | 2 | December 19, 2016 | 3 | other | JavaScript | |
compute the area of a geojson polygon or multipolygon | ||||||||||
Sharedstreets Js | 62 | 7 | 4 | 2 years ago | 61 | May 16, 2020 | 56 | mit | TypeScript | |
SharedStreets (Node.js & Javascript) | ||||||||||
Haversine Distance | 42 | 23 | 9 | 8 months ago | 10 | March 09, 2020 | 2 | mit | JavaScript | |
Haversine formula in Javascript. In meters. Nothing more. | ||||||||||
Geok | 14 | 2 years ago | 3 | October 05, 2021 | mit | Kotlin | ||||
Kotlin geometry library | ||||||||||
Oh Snap | 7 | 1 | 2 | 9 years ago | 2 | January 06, 2015 | JavaScript | |||
Snap points to nearest point in a different set. | ||||||||||
Viewshed | 6 | 2 years ago | mit | Python | ||||||
ViewSHED is an open-source API for computing the visible area given a location and elevation. | ||||||||||
Area | 4 | 4 years ago | other | Dart | ||||||
Calculate the area inside of any GeoJSON geometry. This is a Dart port of Mapbox's geojson-area. | ||||||||||
Geojson_area | 3 | 3 years ago | mit | Crystal | ||||||
Calculate the area inside of any GeoJSON geometry | ||||||||||
Random Coordinates | 3 | 7 years ago | mit | JavaScript | ||||||
Generate a random coordinates, which are latitude and longitude, comma separated. | ||||||||||
Turf Area | 2 | 8 years ago | 1 | JavaScript | ||||||
Calculates the total geographical area in meters squared of any GeoJSON object |
Snap points to nearest point in a different set.
Install via npm:
npm install oh-snap
snap(points,snapTo[,maxDistance])
points
is a GeoJSON feature collection of points.
snapTo
is another GeoJSON feature collection of points.
maxDistance
is an optional maximum distance, in meters (the default is no maximum). If specified, a point in points
will only be counted as being at the nearest point in snapTo
if it's less than maxDistance
meters away.
Let's say you have a GeoJSON collection of points where car crashes happened, and a GeoJSON collection of points for intersections, and you want to get a list of intersections with the number of crashes at/near each.
var snap = require("oh-snap");
//crashes is a GeoJSON FeatureCollection of points
//intersections is another GeoJSON FeatureCollection of points
var result = snap(crashes,intersections);
result
will be another GeoJSON FeatureCollection with the same points as intersections
. Each one will have one new property, called snapped
:
snapped: {
count: 4,
details: [{...},{...},{...},{...}]
}
That means 4 points in crashes
were closest to this intersection. details
is an array of those four crashes' properties, in case you want it.