Gathering detailed insights and metrics for point-in-geopolygon
Gathering detailed insights and metrics for point-in-geopolygon
Gathering detailed insights and metrics for point-in-geopolygon
Gathering detailed insights and metrics for point-in-geopolygon
npm install point-in-geopolygon
Typescript
Module System
Node Version
NPM Version
70.5
Supply Chain
86.7
Quality
74.8
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
10 Stars
4 Commits
3 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Jun 02, 2022
Latest Version
1.0.1
Package Id
point-in-geopolygon@1.0.1
Size
4.52 kB
NPM Version
4.0.5
Node Version
7.4.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
No dependencies detected.
The GeoJSON Polygon is defined by an array of its vertex. The first vertex in the array and the last one MUST be the same point.
1var inside = require('point-in-geopolygon'); 2var jad = [ [ [ 2, 2 ], [ 5, 2 ], [ 5, 6 ], [ 2, 6 ],[ 2, 2 ] ] ]; 3 4console.log([inside.polygon(jad,[3,3] ),inside.polygon(jad,[4,3]),inside.polygon(jad, [9,12])]); 5
output
1[ true, true, false ]
1var inside= require('point-in-geopolygon'); 2var map= JSON.parse('{ "type": "FeatureCollection","features": [{ "type": "Feature","geometry": {"type": "Polygon","coordinates": [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0],[100.0, 1.0], [100.0, 0.0] ]]},"properties": {"city": "Myland","time": "+1"}}]}'); 3 4console.log([inside.feature(map,[100,0.5] ),inside.feature(map,[0,0])]); 5
output
1[ { id: 0, properties: { city: 'Myland', time: '+1' }, type: 'Polygon' }, -1 ]
1var inside = require('point-in-geopolygon');
Return boolean whether point is inside geojson polygon. Point should be a 2-item array of coordinates. Geojson polygon should be an array of 2-item arrays of coordinates first and last vertex are the same exp: [[p1,p2,p4,p1]] where pi=[xi,yi] The method does not distinguish between clockwise and anti clockwise polygon vertex arrangement.
GeoJson Feature supported are Polygon and Multipolygon. Point should be a 2-item array of coordinates. Geojson object contains features array describing different region exp: Geojson.features=[Obj0,Obj1,Obj2..] where Obji={"type":"Feature","geometry":{"type":"Polygon","coordinates"...}} The Method returns object if the point is inside geoJson Object feature else -1. Returned object {id, properties, type} id: feature rank in the features array GeoJson Object. properties: feature properties type: feature geometry type The method does not distinguish between clockwise and anti clockwise polygon vertex arrangement.
1npm install point-in-geopolygon
MIT
Free Software, Hell Yeah!
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/4 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More