Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

using jsts (Javascript Topology Suite) with nodejs

View jsts_with_nodejs.js
1 2 3 4 5 6 7 8 9 10 11 12
#!/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
Something went wrong with that request. Please try again.