Created
May 28, 2012 10:52
-
-
Save unicolet/2818482 to your computer and use it in GitHub Desktop.
using jsts (Javascript Topology Suite) with nodejs
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/nodejs | |
# run from jsts directory, the script expects lib to be a subdir of current dir | |
var i = require('./lib/javascript.util.js'); | |
var j = require('./lib/jsts.js'); | |
var geometryFactory = new jsts.geom.GeometryFactory(); | |
var coordinate = new jsts.geom.Coordinate(1,2); | |
var point = geometryFactory.createPoint(coordinate); | |
console.log("Is it a valid point ? " + (new jsts.operation.valid.IsValidOp(point).isValid())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment