Update README.md

This commit is contained in:
Björn Harrtell 2022-01-24 19:29:16 +01:00 committed by GitHub
parent 82fb99b9a8
commit 35fb9092ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ An ES6+ compatible build for browsers is available [here](https://unpkg.com/jsts
Including the above build as a script will import a global object `jsts` exposing similar public API as `org.locationtech.jts` in the [JTS API](http://locationtech.github.io/jts/javadoc/).
For Node.js 14+, install using `npm install jsts` after which you can import individual modules with fx. `import GeoJSONReader from 'jsts/org/locationtech/jts/io/GeoJSONReader.js'`.
For Node.js 14+, install using `npm install jsts` after which you can import individual modules with fx. `import GeoJSONReader from 'jsts/org/locationtech/jts/io/GeoJSONReader.js'`. Note that since some time JSTS is only delivered as ES modules and you should be aware of https://nodejs.org/api/esm.html and specifically https://nodejs.org/api/esm.html#interoperability-with-commonjs.
I/O related classes in JTS had to be manually ported. From the original formats WKT and GeoJSON are supported. A direct reader/writer for OpenLayers 3+ geometries exist. See the [API documentation](http://bjornharrtell.github.io/jsts/1.6.1/doc/) for these specific classes.