Socket
Socket
Sign inDemoInstall

wkt-parser-helper

Package Overview
Dependencies
3
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    wkt-parser-helper

Module to help parse GeoJSONs to WKT and back


Version published
Weekly downloads
1.7K
decreased by-11.45%
Maintainers
1
Install size
2.29 MB
Created
Weekly downloads
 

Readme

Source

WktParserHelper

Kind: global class

  • WktParserHelper
    • new WktParserHelper()
    • .convertPolygonToWK()
    • .convertToWK(GeoJSON, [type])string | Buffer
    • .parseFromWK(item, [asFeature], [properties])object
    • .convertFeatureCollection(GeoJSON)string

new WktParserHelper()

WktParserHelper class

WktParserHelper.convertPolygonToWK()

Deprecated

Converts GeoJSON to Wkt or Wkb

Kind: static method of WktParserHelper

WktParserHelper.convertToWK(GeoJSON, [type]) ⇒ string | Buffer

Converts GeoJSON to WKT or WKB

Kind: static method of WktParserHelper
Returns: string | Buffer - WKT or WKB

ParamTypeDefaultDescription
GeoJSONObjectGeoJSON to convert to WKT or WKB
[type]'wkt' | 'wkb''wkt'

WktParserHelper.parseFromWK(item, [asFeature], [properties]) ⇒ object

Parses from WKT or WKB

Kind: static method of WktParserHelper
Returns: object - GeoJSON

ParamTypeDefaultDescription
itemstring | BufferWKT or WKB to convert to GeoJSON
[asFeature]booleanfalse
[properties]object{}Properties to embed resulting GeoJSON feature

WktParserHelper.convertFeatureCollection(GeoJSON) ⇒ string

Converts GeoJSON FeatureCollection to WKT GEOMETRYCOLLECTION

Kind: static method of WktParserHelper
Returns: string - WKT or WKT

ParamTypeDescription
GeoJSONObjectGeoJSON FeatureCollection to convert to WKT

Keywords

FAQs

Last updated on 15 Feb 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc