Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
using jsts (Javascript Topology Suite) with 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