Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@acrossthecloud/dbgeo
Advanced tools
A Node.js module for converting database queries to GeoJSON and TopoJSON
Convert database query results to GeoJSON or TopoJSON. Inspired by Bryan McBride's PHP-Database-GeoJSON. Works with your database of choice - ideally paired with node-mysql, node-postgres, or mongodb. It is a more flexible version of postgeo and mysql2geojson (both deprecated).
npm install dbgeo
var dbgeo = require('dbgeo')
// Query a database...
dbgeo.parse(data, {
outputFormat: 'geojson'
}, function(error, result) {
// This will log a valid GeoJSON FeatureCollection
console.log(result)
});
See test/test.js
for more examples.
An array of objects, usually results from a database query.
Configuration object that can contain the following keys:
argument | description | values | default value |
---|---|---|---|
geometryType | Format of input geometry | wkb, wkt, geojson, ll | wkb |
geometryColumn | Name of column that contains geometry. If input geometry type is "ll", this is an array in the format ['longitude', 'latitude'] | Any string | geom |
outputFormat | Desired output format | geojson, topojson | geojson |
precision | Trim the coordinate precision of the output to a given number of digits using geojson-precision | Any integer | null (will not trim precision) |
quantization | Value for quantization process, typically specified as powers of ten, see topojson.quantize | Any integer greater than one | null (no quantization) |
A function with two parameters: an error, and a result object.
Examples can be found in test/test.js
.
The default options for .parse()
. You can set these before using .parse()
if you plan to use the same options continuously.
CC0
FAQs
A Node.js module for converting database queries to GeoJSON and TopoJSON
We found that @acrossthecloud/dbgeo 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.