You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

wkt-parser

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wkt-parser

wkt-parser ===


Version published
Weekly downloads
186K
decreased by-2.21%
Maintainers
2
Created
Weekly downloads
 

Package description

What is wkt-parser?

The wkt-parser npm package is used to parse and convert Well-Known Text (WKT) representations of geometric shapes into JavaScript objects and vice versa. This is particularly useful in geographic information systems (GIS) and other applications that require manipulation of geometric data.

What are wkt-parser's main functionalities?

Parsing WKT to JavaScript Object

This feature allows you to parse a WKT string into a JavaScript object. The example demonstrates parsing a WKT string representing a point into a JavaScript object.

const wkt = require('wkt-parser');
const wktString = 'POINT (30 10)';
const geometry = wkt.parse(wktString);
console.log(geometry);

Converting JavaScript Object to WKT

This feature allows you to convert a JavaScript object representing a geometric shape back into a WKT string. The example shows converting a JavaScript object representing a point into a WKT string.

const wkt = require('wkt-parser');
const geometry = { type: 'Point', coordinates: [30, 10] };
const wktString = wkt.stringify(geometry);
console.log(wktString);

Other packages similar to wkt-parser

Readme

Source

wkt-parser

The wkt parser pulled out of proj4 so it can be hacked on.

FAQs

Package last updated on 21 May 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc