Socket
Socket
Sign inDemoInstall

geojson-random

Package Overview
Dependencies
0
Maintainers
21
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 to 0.2.2

5

CHANGELOG.md

@@ -0,1 +1,6 @@

# 1.0.1
* Fix `coordInBBBOX` function to fix the output of points within small bounding
boxes.
# 1.0.0

@@ -2,0 +7,0 @@

7

index.js

@@ -71,8 +71,5 @@ module.exports = function() {

function coordInBBBOX(bbox) {
var lonSpan = bbox[2] - bbox[0],
latSpan = bbox[3] - bbox[1],
randInSpan = Math.random() * (lonSpan * latSpan);
return [
(bbox[2] === bbox[0]) ? bbox[2] : randInSpan % (lonSpan) + bbox[0],
(bbox[3] === bbox[1]) ? bbox[1] : randInSpan / (latSpan) + bbox[1]];
(Math.random() * (bbox[2] - bbox[0])) + bbox[0],
(Math.random() * (bbox[3] - bbox[1])) + bbox[1]];
}

@@ -79,0 +76,0 @@

{
"name": "geojson-random",
"version": "0.2.1",
"version": "0.2.2",
"description": "generate random geojson features",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc