
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
dxf-polygon-importer
Advanced tools
Imports and converts polylines to polygons from a DXF file to a PostGIS table.
Parses a DXF file and imports closed 'CAD Polylines' as polygons and labels as points into a PostGIS table. The imports will be versioned based on a project identifier and filename combination.
npm install dxf-polygon-importer
The module requires ogr2ogr and a PostGIS enabled PostgreSQL database connection.
Following environment variables need to be set:
DXF_TOOLS_DB_HOST ... PostgreSQL server host
DXF_TOOLS_DB_USER ... Database user name
DXF_TOOLS_DB_PASSWORD ... Database user password
DXF_TOOLS_DB_NAME ... Database name
The module creates following database tables and views:
dxf_features [table] ... all imported geometries
all_polygons [view] ... last version of imported polygons
all_labels [view] ... last version of imported label points
var Importer = require('dxf-polygon-importer');
Importer('mydrawing.dxf', {
polygonLayer: 'MYPOLYLINES',
labelLayer: 'MYNAMES',
project: 'MyProject'
}).go().then(function (data) {
// handle data
// { filename: 'mydrawing.dxf', project: 'MyProject', version: 1 }
});
Importer(file, options)
The class takes a DXF file path as first file
argument and options
object with following properties as second:
{
polygonLayer: String, ... CAD layer containing polygons
labelLayer: String, ... CAD layer containing labels
project: String ... Unique project identifier
}
Importer.go(keepPool)
Initiates the import process with schema-setup, polyline-conversions and sql-inserts. The method takes a keepPool
Boolean argument to indicate if database connection pool should be kept alive or torn down after import. This can be useful if the pool should be used for multiple subsequent imports. Default value is falsy, 'undefined'.
Importer.destroy()
Alias to terminate database connection pool.
FAQs
Imports and converts polylines to polygons from a DXF file to a PostGIS table.
We found that dxf-polygon-importer 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.