Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
sane-topojson
Advanced tools
Ready-to-use multi-layer topojson files.
--> Go to Natural Earth CHANGELOG
This project encompasses the three step required to turn Natural Earth Data into topojson files.
These are:
npm run wget
: download to Natural Earth shapefiles and unzips themnpm run shp2geo
: clip and convert shapefiles into geojson filesnpm run geo2topo
add properties and convert the geojson files into topojson
filesnpm install sane-topojson
and import/require the index.js
or the one of the dist/
files.
A topojson with the objects
field:
{
coastlines: {
type: '',
geometries: []
},
countries: {
type: '',
geometries: [
{type: '', id: '', arcs: [], properties: {ct: [lon, lat]}},
// ...
]
},
lakes: {
type: '',
geometries: []
},
land: {
type: '',
geometries: []
},
ocean: {
type: '',
geometries: []
}
rivers: {
type: '',
geometries: []
}
subunits: {
type: '',
geometries: [
{type: '', id: '', arcs: [], properties: {ct: [lon, lat], gu: 'ISO-3'}},
// ...
]
}
}
where id
is the ISO-3 code for the countries
layer and two-letter postal
code for the subunits
layer. In properties
, ct
is the longitude and
latitude coordinates (in degrees East and degrees North respectively) of the
centroid of the geometry's largest polygon in area and gu
stands for the
"governing unit" for subunits
features (i.e. the country where the subunit
is).
In ./config.json
:
resolutions
: array of resolutions to outputscopes
: array of scopes to outputsane-topojson will output resolution.length
times scopes.length
topojson
files.
vectors
: array of layers making up each topojson file2019 Étienne Tétreault-Pinard. MIT License
FAQs
Ready-to-use multi-layer topojson files
We found that sane-topojson demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.