Last active
July 5, 2016 09:31
-
-
Save andrewharvey/113d277ce9847cbc73251a2e59314364 to your computer and use it in GitHub Desktop.
JSTS Issue TypeError: this.seg.p1.equals2D is not a function https://github.com/bjornharrtell/jsts/issues/276
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/node | |
var jsts = require('jsts'); | |
var reader = new jsts.io.GeoJSONReader(); | |
var fs = require('fs'); | |
var poly1 = JSON.parse(fs.readFileSync('a.geojson', 'utf8')); | |
var poly2 = JSON.parse(fs.readFileSync('b.geojson', 'utf8')); | |
var a = reader.read(JSON.stringify(poly1.geometry)); | |
var b = reader.read(JSON.stringify(poly2.geometry)); | |
var union = a.union(b); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment