From 19629cd4459f74eacfec54ee047cf693188d6bcd Mon Sep 17 00:00:00 2001 From: erelsgl Date: Tue, 11 Mar 2014 22:24:09 +0200 Subject: [PATCH 1/8] add Node.js examples --- examples/nodejs/README.md | 6 ++++ .../nodejs/polygon-line-point-operations.js | 28 +++++++++++++++++++ examples/nodejs/polygon-operations.js | 23 +++++++++++++++ examples/nodejs/polygon-polygon-operations.js | 28 +++++++++++++++++++ examples/nodejs/show.js | 9 ++++++ 5 files changed, 94 insertions(+) create mode 100644 examples/nodejs/README.md create mode 100644 examples/nodejs/polygon-line-point-operations.js create mode 100644 examples/nodejs/polygon-operations.js create mode 100644 examples/nodejs/polygon-polygon-operations.js create mode 100644 examples/nodejs/show.js diff --git a/examples/nodejs/README.md b/examples/nodejs/README.md new file mode 100644 index 000000000..8dd52e6df --- /dev/null +++ b/examples/nodejs/README.md @@ -0,0 +1,6 @@ +Node.JS examples +================ + +To run the examples, you have to install jsts from npm: + + npm install -g jsts diff --git a/examples/nodejs/polygon-line-point-operations.js b/examples/nodejs/polygon-line-point-operations.js new file mode 100644 index 000000000..565b2e6df --- /dev/null +++ b/examples/nodejs/polygon-line-point-operations.js @@ -0,0 +1,28 @@ +/** + * Example of calculating intersection between a polygon and a line or a point. + */ + +var jsts = require("jsts"); +var show = require("./show"); // just for showing the geometric objects during the example. + +var reader = new jsts.io.WKTReader(); + + +var polygon = reader.read('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); // the square between (0,0) and (10,10) +var line1 = reader.read('LINESTRING(-10 8, 20 8)'); +var line2 = reader.read('LINESTRING(0 11, 11 11)'); +var point1 = reader.read("POINT(7 7)"); +var point2 = reader.read("POINT(11 11)"); + +show("polygon",polygon); +show("line1",line1); +show("line2",line2); +show("point1",point1); +show("point2",point2); + +show("line1 ^ polygon", line1.intersection(polygon)); +show("polygon ^ line2", polygon.intersection(line2)); + +show("point1 ^ polygon", point1.intersection(polygon)); +show("polygon ^ point2", polygon.intersection(point2)); + diff --git a/examples/nodejs/polygon-operations.js b/examples/nodejs/polygon-operations.js new file mode 100644 index 000000000..a94ea3900 --- /dev/null +++ b/examples/nodejs/polygon-operations.js @@ -0,0 +1,23 @@ +/** + * Example of constructing and translating polygons.. + */ + +var jsts = require("jsts"); +var factory = new jsts.geom.GeometryFactory(); + +var show = require("./show"); // just for showing the geometric objects during the example. + + +// some shorthands: + +function coord(x,y) { return new jsts.geom.Coordinate(x,y); } +function coordlist(array) { return new jsts.geom.CoordinateList(array); } + +var a = factory.createPolygon(coordlist([coord(0, 0), coord(0, 10), coord(10, 10), coord(10, 0), coord(0, 0)])); +var b = factory.createPolygon(coordlist([coord(5, 5), coord(5, 20), coord(20, 20), coord(20, 5), coord(5, 5)])); +show("a",a); +show("b",b); + +console.log(a.intersects(b)? "a intersects b": "a does not intersect b"); +show("a ^ b",a.intersection(b)); // the square between (5,5) and (10,10) + diff --git a/examples/nodejs/polygon-polygon-operations.js b/examples/nodejs/polygon-polygon-operations.js new file mode 100644 index 000000000..87f9b102c --- /dev/null +++ b/examples/nodejs/polygon-polygon-operations.js @@ -0,0 +1,28 @@ +/** + * Example of calculating intersection and union between polygons. + */ + +var jsts = require("jsts"); +var show = require("./show"); // just for showing the geometric objects during the example. + +var reader = new jsts.io.WKTReader(); + +var a = reader.read('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); // the square between (0,0) and (10,10) +var b = reader.read('POLYGON((5 5, 5 20, 20 20, 20 5, 5 5))'); // the square between (5,5) and (20,20) +var c = reader.read('POLYGON((15 15, 15 20, 20 20, 20 15, 15 15))'); // the square between (15,15) and (20,20) +var d = reader.read('POLYGON((5 5, 10 10, 5 15, 0 10, 5 5))'); // a rotated square + +show("a",a); +show("b",b); +show("c",c); +show("d",d); + +console.log(a.intersects(b)? "a intersects b": "a does not intersect b"); +show("a ^ b",a.intersection(b)); // the square between (5,5) and (10,10) +console.log(a.intersects(c)? "a intersects c": "a does not intersect c"); +show("a ^ c",a.intersection(c)); // empty intersection +console.log(a.intersects(d)? "a intersects d": "a does not intersect d"); +show("a ^ d",a.intersection(d)); // a RAIT +show("a U b",a.union(b)); // octagon +show("a U c",a.union(c)); // two disjoint squares +show("a U d",a.union(d)); // two disjoint squares diff --git a/examples/nodejs/show.js b/examples/nodejs/show.js new file mode 100644 index 000000000..e4e931e7a --- /dev/null +++ b/examples/nodejs/show.js @@ -0,0 +1,9 @@ +/** + * A simple routine for showing geometric objects in the examples. + */ + + +var util = require("util") +module.exports = function (title, polygon) { + console.log(title+" = \n"+util.inspect(polygon,null,3)+" "+(polygon.isEmpty() ?" EMPTY": "NONEMPTY")+"\n\n"); +} From 56bc6d02910e141ecf6d742c3bd540a46bea68dc Mon Sep 17 00:00:00 2001 From: erelsgl Date: Wed, 12 Mar 2014 08:58:40 +0200 Subject: [PATCH 2/8] rename and improve node.js examples --- ...t-operations.js => binary-operations-1.js} | 2 + ...n-operations.js => binary-operations-2.js} | 3 +- examples/nodejs/polygon-operations.js | 23 --------- examples/nodejs/show.js | 7 +-- examples/nodejs/unary-operations.js | 47 +++++++++++++++++++ 5 files changed, 55 insertions(+), 27 deletions(-) rename examples/nodejs/{polygon-line-point-operations.js => binary-operations-1.js} (90%) rename examples/nodejs/{polygon-polygon-operations.js => binary-operations-2.js} (95%) delete mode 100644 examples/nodejs/polygon-operations.js create mode 100644 examples/nodejs/unary-operations.js diff --git a/examples/nodejs/polygon-line-point-operations.js b/examples/nodejs/binary-operations-1.js similarity index 90% rename from examples/nodejs/polygon-line-point-operations.js rename to examples/nodejs/binary-operations-1.js index 565b2e6df..d9a152b3c 100644 --- a/examples/nodejs/polygon-line-point-operations.js +++ b/examples/nodejs/binary-operations-1.js @@ -26,3 +26,5 @@ show("polygon ^ line2", polygon.intersection(line2)); show("point1 ^ polygon", point1.intersection(polygon)); show("polygon ^ point2", polygon.intersection(point2)); +show("point1 ? polygon", point1.relate(polygon)); +show("polygon ? line2", polygon.relate(line2)); diff --git a/examples/nodejs/polygon-polygon-operations.js b/examples/nodejs/binary-operations-2.js similarity index 95% rename from examples/nodejs/polygon-polygon-operations.js rename to examples/nodejs/binary-operations-2.js index 87f9b102c..de0d294af 100644 --- a/examples/nodejs/polygon-polygon-operations.js +++ b/examples/nodejs/binary-operations-2.js @@ -25,4 +25,5 @@ console.log(a.intersects(d)? "a intersects d": "a does not intersect d"); show("a ^ d",a.intersection(d)); // a RAIT show("a U b",a.union(b)); // octagon show("a U c",a.union(c)); // two disjoint squares -show("a U d",a.union(d)); // two disjoint squares +show("a U d",a.union(d)); // a house-shaped pentagon + diff --git a/examples/nodejs/polygon-operations.js b/examples/nodejs/polygon-operations.js deleted file mode 100644 index a94ea3900..000000000 --- a/examples/nodejs/polygon-operations.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Example of constructing and translating polygons.. - */ - -var jsts = require("jsts"); -var factory = new jsts.geom.GeometryFactory(); - -var show = require("./show"); // just for showing the geometric objects during the example. - - -// some shorthands: - -function coord(x,y) { return new jsts.geom.Coordinate(x,y); } -function coordlist(array) { return new jsts.geom.CoordinateList(array); } - -var a = factory.createPolygon(coordlist([coord(0, 0), coord(0, 10), coord(10, 10), coord(10, 0), coord(0, 0)])); -var b = factory.createPolygon(coordlist([coord(5, 5), coord(5, 20), coord(20, 20), coord(20, 5), coord(5, 5)])); -show("a",a); -show("b",b); - -console.log(a.intersects(b)? "a intersects b": "a does not intersect b"); -show("a ^ b",a.intersection(b)); // the square between (5,5) and (10,10) - diff --git a/examples/nodejs/show.js b/examples/nodejs/show.js index e4e931e7a..e2780dbf7 100644 --- a/examples/nodejs/show.js +++ b/examples/nodejs/show.js @@ -3,7 +3,8 @@ */ -var util = require("util") +//var util = require("util"); module.exports = function (title, polygon) { - console.log(title+" = \n"+util.inspect(polygon,null,3)+" "+(polygon.isEmpty() ?" EMPTY": "NONEMPTY")+"\n\n"); -} + //console.log(title+" = \n"+util.inspect(polygon,null,3)+" "+(polygon.isEmpty? (polygon.isEmpty() ?" EMPTY": "NONEMPTY"): "")+"\n\n"); + console.log(title+" = "+polygon.toString()+" "+(polygon.isEmpty? (polygon.isEmpty() ?" EMPTY": "NONEMPTY"): "")+"\n\n"); +}; diff --git a/examples/nodejs/unary-operations.js b/examples/nodejs/unary-operations.js new file mode 100644 index 000000000..25bec1455 --- /dev/null +++ b/examples/nodejs/unary-operations.js @@ -0,0 +1,47 @@ +/** + * Example of constructing and translating polygons. + */ +var jsts = require("jsts"); +var factory = new jsts.geom.GeometryFactory(); + +var show = require("./show"); // just for showing the geometric objects during the example. + + +// some shorthands: + +function coord(x,y) { return new jsts.geom.Coordinate(x,y); } +function linstr(coords) { return factory.createLineString(coords); } +function linring(coords) { return factory.createLinearRing(coords); } +function polygon(coords,holes) { return factory.createPolygon(linring(coords),holes); } + +var a = polygon([coord(0, 0), coord(0, 10), coord(10, 10), coord(10, 0), coord(0, 0)]); +var b = polygon([coord(5, 5), coord(5, 20), coord(20, 20), coord(20, 5), coord(5, 5)]); +var c = linstr([coord(3,0), coord(3,10)]); +show("a",a); +show("b",b); +show("c",c); + +show("a.centroid", a.getCentroid()); //(5,5) +show("b.centroid", b.getCentroid()); //(12.5,12.5) +show("c.centroid", c.getCentroid()); //(3,5) + +show("a.dimension", a.getDimension()); // 2 +show("b.dimension", b.getDimension()); // 2 +show("c.dimension", c.getDimension()); // 1 + +show("a.type", a.getGeometryType()); // Geometry +show("b.type", b.getGeometryType()); // Geometry +show("c.type", c.getGeometryType()); // LineString + +show("a.length", a.getLength()); // 40 +show("b.length", b.getLength()); // 60 +show("c.length", c.getLength()); // 10 + +//show("a.numpoints", a.getNumPoints()); // 40 +//show("b.numpoints", b.getNumPoints()); // 60 +//show("c.numpoints", c.getNumPoints()); // 10 + + +show("a.isRectangle", a.isRectangle()); // false?! +show("b.isRectangle", b.isRectangle()); // false?! +show("c.isRectangle", c.isRectangle()); // false?! From 57dacc11b528939c2f7b777efce9e551426e6134 Mon Sep 17 00:00:00 2001 From: erelsgl Date: Wed, 12 Mar 2014 11:25:50 +0200 Subject: [PATCH 3/8] add getArea --- examples/nodejs/unary-operations.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/examples/nodejs/unary-operations.js b/examples/nodejs/unary-operations.js index 25bec1455..37c3c09a4 100644 --- a/examples/nodejs/unary-operations.js +++ b/examples/nodejs/unary-operations.js @@ -37,11 +37,6 @@ show("a.length", a.getLength()); // 40 show("b.length", b.getLength()); // 60 show("c.length", c.getLength()); // 10 -//show("a.numpoints", a.getNumPoints()); // 40 -//show("b.numpoints", b.getNumPoints()); // 60 -//show("c.numpoints", c.getNumPoints()); // 10 - - -show("a.isRectangle", a.isRectangle()); // false?! -show("b.isRectangle", b.isRectangle()); // false?! -show("c.isRectangle", c.isRectangle()); // false?! +show("a.area", a.getArea()); // 100 (10x10) +show("b.area", b.getArea()); // 225 (15x15) +// show("c.area", c.getArea()); // error: a linestring doesn't have area From efb1c7e2fa4d08cbbc9ce7c702cfdbff6bb5c8ea Mon Sep 17 00:00:00 2001 From: erelsgl Date: Wed, 12 Mar 2014 11:40:32 +0200 Subject: [PATCH 4/8] add examples of normalization and comparison --- examples/nodejs/binary-operations-2.js | 15 ++++++++++++++- examples/nodejs/unary-operations.js | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/examples/nodejs/binary-operations-2.js b/examples/nodejs/binary-operations-2.js index de0d294af..80a6b56cd 100644 --- a/examples/nodejs/binary-operations-2.js +++ b/examples/nodejs/binary-operations-2.js @@ -18,11 +18,24 @@ show("c",c); show("d",d); console.log(a.intersects(b)? "a intersects b": "a does not intersect b"); -show("a ^ b",a.intersection(b)); // the square between (5,5) and (10,10) +var a_intersection_b = a.intersection(b); +show("a ^ b",a_intersection_b); // the square between (5,5) and (10,10) +var e = reader.read('POLYGON((5 5, 5 10, 10 10, 10 5, 5 5))'); // also the square between (5,5) and (10,10) +show("e",e); +show("a^b equalsExact e",a_intersection_b.equalsExact(e)); // false +show("a^b equalsTopo e",a_intersection_b.equalsTopo(e)); // true +a_intersection_b = a_intersection_b.norm(); +e = e.norm(); +show("a^b normalized",a_intersection_b); +show("e normalized",e); +show("a^b normalized equalsExact e normalized",a_intersection_b.equalsExact(e)); // false + console.log(a.intersects(c)? "a intersects c": "a does not intersect c"); show("a ^ c",a.intersection(c)); // empty intersection + console.log(a.intersects(d)? "a intersects d": "a does not intersect d"); show("a ^ d",a.intersection(d)); // a RAIT + show("a U b",a.union(b)); // octagon show("a U c",a.union(c)); // two disjoint squares show("a U d",a.union(d)); // a house-shaped pentagon diff --git a/examples/nodejs/unary-operations.js b/examples/nodejs/unary-operations.js index 37c3c09a4..beb5a977b 100644 --- a/examples/nodejs/unary-operations.js +++ b/examples/nodejs/unary-operations.js @@ -39,4 +39,5 @@ show("c.length", c.getLength()); // 10 show("a.area", a.getArea()); // 100 (10x10) show("b.area", b.getArea()); // 225 (15x15) + // show("c.area", c.getArea()); // error: a linestring doesn't have area From 90e3dcc4f36fd0fc78b429344a80b7a74e436141 Mon Sep 17 00:00:00 2001 From: erelsgl Date: Wed, 12 Mar 2014 13:21:41 +0200 Subject: [PATCH 5/8] add envelope --- examples/nodejs/binary-operations-2.js | 2 +- examples/nodejs/unary-operations.js | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/examples/nodejs/binary-operations-2.js b/examples/nodejs/binary-operations-2.js index 80a6b56cd..3f30851cd 100644 --- a/examples/nodejs/binary-operations-2.js +++ b/examples/nodejs/binary-operations-2.js @@ -1,5 +1,5 @@ /** - * Example of calculating intersection and union between polygons. + * Example of calculating intersection and union between polygons, normalization and equality checking. */ var jsts = require("jsts"); diff --git a/examples/nodejs/unary-operations.js b/examples/nodejs/unary-operations.js index beb5a977b..dcdb0a33c 100644 --- a/examples/nodejs/unary-operations.js +++ b/examples/nodejs/unary-operations.js @@ -15,14 +15,14 @@ function linring(coords) { return factory.createLinearRing(coords); } function polygon(coords,holes) { return factory.createPolygon(linring(coords),holes); } var a = polygon([coord(0, 0), coord(0, 10), coord(10, 10), coord(10, 0), coord(0, 0)]); -var b = polygon([coord(5, 5), coord(5, 20), coord(20, 20), coord(20, 5), coord(5, 5)]); +var b = polygon([coord(5, 5), coord(10, 10), coord(5, 15), coord(0, 10), coord(5, 5)]); var c = linstr([coord(3,0), coord(3,10)]); show("a",a); show("b",b); show("c",c); show("a.centroid", a.getCentroid()); //(5,5) -show("b.centroid", b.getCentroid()); //(12.5,12.5) +show("b.centroid", b.getCentroid()); //(5,10) show("c.centroid", c.getCentroid()); //(3,5) show("a.dimension", a.getDimension()); // 2 @@ -34,10 +34,16 @@ show("b.type", b.getGeometryType()); // Geometry show("c.type", c.getGeometryType()); // LineString show("a.length", a.getLength()); // 40 -show("b.length", b.getLength()); // 60 +show("b.length", b.getLength()); // 20*sqrt(2) show("c.length", c.getLength()); // 10 show("a.area", a.getArea()); // 100 (10x10) -show("b.area", b.getArea()); // 225 (15x15) +show("b.area", b.getArea()); // 50 (100/2) +//show("c.area", c.getArea()); // error: a linestring doesn't have area -// show("c.area", c.getArea()); // error: a linestring doesn't have area +show("a.envelope", a.getEnvelope()); // == a +show("b.envelope", b.getEnvelope()); // = the square [0,10]x[5,15] +show("c.envelope", c.getEnvelope()); // == c + +show("a.envelope.area", a.getEnvelope().getArea()); // 100 +show("b.envelope.area", b.getEnvelope().getArea()); // 100 From 83bf779acbb65de526b69e82b78c401be3c7178b Mon Sep 17 00:00:00 2001 From: erelsgl Date: Wed, 12 Mar 2014 16:19:01 +0200 Subject: [PATCH 6/8] add relations demo --- examples/nodejs/relations.js | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 examples/nodejs/relations.js diff --git a/examples/nodejs/relations.js b/examples/nodejs/relations.js new file mode 100644 index 000000000..0a1fdfb5f --- /dev/null +++ b/examples/nodejs/relations.js @@ -0,0 +1,44 @@ +/** + * Example of calculating intersection between a polygon and a line or a point. + */ + +var jsts = require("jsts"); + +var reader = new jsts.io.WKTReader(); + +function booleanRelationToString(shape1, shape2, relationName) { + var relationHolds = shape1[relationName](shape2); + if (relationHolds) { + return relationName+"s"; + } else { + return "does not "+relationName; + } +} + +var polygon = reader.read('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); // the square between (0,0) and (10,10) + +var points = {}; +points.internal = reader.read("POINT(7 7)"); // a point inside the square +points.boundary = reader.read("POINT(10 5)"); // a point on the boundary of the square +points.external = reader.read("POINT(11 11)"); // a point outside the square + +var relations = [ + "disjoint", "touches", + "intersects", //"crosses", + "within", "contains", + "overlaps", + //"covers", "coveredBy", + "relate" + ]; + + +for (var p in points) { + console.log("\n"+p+"\n--------\n"); + var point = points[p]; + for (var r in relations) { + var relation = relations[r]; + console.log("polygon."+relation+"("+p+") = "+polygon[relation](point)); + console.log(p+"."+relation+"(polygon) = "+point[relation](polygon)); + } +} + From b605086cdb8de508165776d232675ccad635b253 Mon Sep 17 00:00:00 2001 From: erelsgl Date: Wed, 12 Mar 2014 21:56:52 +0200 Subject: [PATCH 7/8] add more relations --- examples/nodejs/binary-operations-1.js | 3 --- examples/nodejs/relations.js | 26 +++++++++++++++----------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/examples/nodejs/binary-operations-1.js b/examples/nodejs/binary-operations-1.js index d9a152b3c..5d5cf3017 100644 --- a/examples/nodejs/binary-operations-1.js +++ b/examples/nodejs/binary-operations-1.js @@ -25,6 +25,3 @@ show("polygon ^ line2", polygon.intersection(line2)); show("point1 ^ polygon", point1.intersection(polygon)); show("polygon ^ point2", polygon.intersection(point2)); - -show("point1 ? polygon", point1.relate(polygon)); -show("polygon ? line2", polygon.relate(line2)); diff --git a/examples/nodejs/relations.js b/examples/nodejs/relations.js index 0a1fdfb5f..a0d88f712 100644 --- a/examples/nodejs/relations.js +++ b/examples/nodejs/relations.js @@ -1,5 +1,5 @@ /** - * Example of calculating intersection between a polygon and a line or a point. + * Example of calculating intersection between a reference and a line or a point. */ var jsts = require("jsts"); @@ -15,12 +15,16 @@ function booleanRelationToString(shape1, shape2, relationName) { } } -var polygon = reader.read('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); // the square between (0,0) and (10,10) +var reference = reader.read('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); // the square between (0,0) and (10,10) -var points = {}; -points.internal = reader.read("POINT(7 7)"); // a point inside the square -points.boundary = reader.read("POINT(10 5)"); // a point on the boundary of the square -points.external = reader.read("POINT(11 11)"); // a point outside the square +var others = {}; +others.internalPoint = reader.read("POINT(7 7)"); // a point inside the square +others.boundaryPoint = reader.read("POINT(10 5)"); // a point on the boundary of the square +others.externalPoint = reader.read("POINT(11 11)"); // a point outside the square +others.farawaySquare = reader.read('POLYGON((20 20, 20 30, 30 30, 30 20, 20 20))'); // the square between (20,20) and (30,30) +others.cornerSquare = reader.read('POLYGON((10 10, 10 30, 30 30, 30 10, 10 10))'); // the square between (10,10) and (30,30) +others.sideSquare = reader.read('POLYGON((10 0, 10 30, 30 30, 30 0, 10 0))'); // the rectangle between (10,0) and (30,30) +others.overlappingSquare = reader.read('POLYGON((5 5, 5 20, 20 20, 20 5, 5 5))'); // the square between (5,5) and (20,20) var relations = [ "disjoint", "touches", @@ -32,13 +36,13 @@ var relations = [ ]; -for (var p in points) { - console.log("\n"+p+"\n--------\n"); - var point = points[p]; +for (var p in others) { + console.log("\n"+p+"\n-----------------\n"); + var point = others[p]; for (var r in relations) { var relation = relations[r]; - console.log("polygon."+relation+"("+p+") = "+polygon[relation](point)); - console.log(p+"."+relation+"(polygon) = "+point[relation](polygon)); + console.log("reference."+relation+"("+p+") = "+reference[relation](point)); + console.log(p+"."+relation+"(reference) = "+point[relation](reference)); } } From 4106a7bb2f767aeab7934de0dd89e5e4f55b9945 Mon Sep 17 00:00:00 2001 From: erelsgl Date: Wed, 12 Mar 2014 22:00:15 +0200 Subject: [PATCH 8/8] relations doc --- examples/nodejs/relations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/nodejs/relations.js b/examples/nodejs/relations.js index a0d88f712..aa4727696 100644 --- a/examples/nodejs/relations.js +++ b/examples/nodejs/relations.js @@ -1,5 +1,5 @@ /** - * Example of calculating intersection between a reference and a line or a point. + * Calculating the various boolean relations (overlaps, contains, etc.) */ var jsts = require("jsts");