![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
npm install wkx-ts
wkx-ts is a typescript version of the wkx library.
A WKT/WKB/EWKT/EWKB/TWKB/GeoJSON parser and serializer with support for
The following examples show you how to work with wkx.
import { Geometry, Point } from 'wkx-ts';
//Parsing a WKT string
var geometry = Geometry.parse('POINT(1 2)');
//Parsing an EWKT string
var geometry = Geometry.parse('SRID=4326;POINT(1 2)');
//Parsing a node Buffer containing a WKB object
var geometry = Geometry.parse(wkbBuffer);
//Parsing a node Buffer containing an EWKB object
var geometry = Geometry.parse(ewkbBuffer);
//Parsing a node Buffer containing a TWKB object
var geometry = Geometry.parseTwkb(twkbBuffer);
//Parsing a GeoJSON object
var geometry = Geometry.parseGeoJSON({ type: 'Point', coordinates: [1, 2] });
//Serializing a Point geometry to WKT
var wktString = new Point(1, 2).toWkt();
//Serializing a Point geometry to WKB
var wkbBuffer = new Point(1, 2).toWkb();
//Serializing a Point geometry to EWKT
var ewktString = new Point(1, 2, 0, 0, 4326).toEwkt();
//Serializing a Point geometry to EWKB
var ewkbBuffer = new Point(1, 2, 0, 0, 4326).toEwkb();
//Serializing a Point geometry to TWKB
var twkbBuffer = new Point(1, 2).toTwkb();
//Serializing a Point geometry to GeoJSON
var geoJSONObject = new Point(1, 2).toGeoJSON();
Regardless of which of the preceeding options you choose, using wkx
in the browser will look the same:
import { Geometry } from 'wkx-ts';
const geometry = Geometry.parse('POINT(1 2)');
console.log(geometry.toGeoJSON());
In addition to the wkx-ts
module, you should install the buffer
module to use the Buffer
class in the browser.
npm install buffer
import {Buffer} from 'buffer/index'; // To use the node_modules version of the Buffer class
import { Geometry } from 'wkx-ts';
const wkbBuffer = new Buffer('0101000000000000000000f03f0000000000000040', 'hex');
const geometry = Geometry.parse(wkbBuffer);
console.log(geometry.toGeoJSON());
FAQs
A WKT/WKB/EWKT/EWKB/TWKB/GeoJSON parser and serializer
The npm package wkx-ts receives a total of 228 weekly downloads. As such, wkx-ts popularity was classified as not popular.
We found that wkx-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.