Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
@ideditor/location-conflation
Advanced tools
Define complex geographic regions by including and excluding country codes and geojson shapes
🧩 Define complex geographic regions by including and excluding country codes and GeoJSON shapes.
Location-conflation is a tool for generating GeoJSON features by including and excluding other locations and shapes.
⚡️ Try it now!: https://ideditor.github.io/location-conflation/
You can define a location set as an Object with include
and exclude
properties:
let locationSet = {
include: [ Array of locations ],
exclude: [ Array of locations ]
};
The "locations" can be any of the following:
"de"
.geojson
features. If you want to use your own features, pass them to the LocationConflation constructor in a FeatureCollection
- each Feature
must have an id
that ends in .geojson
."de-hamburg.geojson"
[longitude, latitude]
coordinate pairs. A 25km radius circle will be computed around the point.[8.67039, 49.41882]
To install location-conflation as a dependency in your project:
$ npm install --save @ideditor/location-conflation
location-conflation is distributed in both UMD and ES6 module formats for maxmimum compatibility. (Read more about Javascript module formats)
index.mjs
- ES6 moduledist/index.js
- UMD module, ES6 syntaxdist/index.es5.js
- UMD module, ES5 syntaxWhether you require or import it, it should just work.
const LocationConflation = require('@ideditor/location-conflation'); // UMD import all
// or
import * as LocationConflation from '@ideditor/location-conflation'; // ES6 import all
You can also use location-conflation directly in a web browser. A good way to do this is to fetch the file from the jsDelivr CDN, which can even deliver minified versions.
The latest versions of many web browsers now support ES6 modules in script tags like this:
<script type="module" src="https://cdn.jsdelivr.net/npm/@ideditor/location-conflation@0/index.min.mjs"></script>
Older versions of modern ES6-capable browsers can still load the UMD build:
<script src="https://cdn.jsdelivr.net/npm/@ideditor/location-conflation@0/dist/index.min.js"></script>
Or if you need to support even older browsers like Internet Explorer, fetch the ES5 version:
<script src="https://cdn.jsdelivr.net/npm/@ideditor/location-conflation@0/dist/index.es5.min.js"></script>
const LocationConflation = require('@ideditor/location-conflation');
const myFeatures = require('./path/to/FeatureCollection.json'); // optional
const loco = new LocationConflation(myFeatures);
let result = loco.resolveLocationSet({ include: ['039'] }); // 039 = Southern Europe
let result = loco.resolveLocationSet({ include: ['039','015'] }); // 015 = Northern Africa
let result = loco.resolveLocationSet({ include: ['039','015'], exclude: ['eg','sd'] });
let result = loco.resolveLocationSet({ include: ['alps.geojson'], exclude: ['li', [8.55,47.36], [7.45,46.95]] });
area
property containing the approximate size of the feature in km²id
in the form +[included]-[excluded]
git clone git@github.com:ideditor/location-conflation.git
cd
into the project folder,npm install
to install librariesnpm run build
This project is available under the ISC License. See the LICENSE.md file for more details.
0.4.0
stringify
convenience methodFAQs
Define complex geographic regions by including and excluding country codes and geojson shapes
The npm package @ideditor/location-conflation receives a total of 42 weekly downloads. As such, @ideditor/location-conflation popularity was classified as not popular.
We found that @ideditor/location-conflation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.