jsts-rails 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/jsts-rails/version.rb +1 -1
- data/vendor/assets/javascripts/javascript.util.js +33 -1
- data/vendor/assets/javascripts/jsts-original.js +164 -1573
- data/vendor/assets/javascripts/jsts.js +197 -0
- data/vendor/assets/javascripts/jsts/algorithm/Angle.js +387 -0
- data/vendor/assets/javascripts/jsts/algorithm/BoundaryNodeRule.js +67 -0
- data/vendor/assets/javascripts/jsts/algorithm/CGAlgorithms.js +596 -0
- data/vendor/assets/javascripts/jsts/algorithm/CentralEndpointIntersector.js +118 -0
- data/vendor/assets/javascripts/jsts/algorithm/CentroidArea.js +225 -0
- data/vendor/assets/javascripts/jsts/algorithm/CentroidLine.js +85 -0
- data/vendor/assets/javascripts/jsts/algorithm/CentroidPoint.js +77 -0
- data/vendor/assets/javascripts/jsts/algorithm/ConvexHull.js +409 -0
- data/vendor/assets/javascripts/jsts/algorithm/HCoordinate.js +234 -0
- data/vendor/assets/javascripts/jsts/algorithm/LineIntersector.js +502 -0
- data/vendor/assets/javascripts/jsts/algorithm/MCPointInRing.js +124 -0
- data/vendor/assets/javascripts/jsts/algorithm/PointLocator.js +247 -0
- data/vendor/assets/javascripts/jsts/algorithm/RayCrossingCounter.js +215 -0
- data/vendor/assets/javascripts/jsts/algorithm/RobustDeterminant.js +353 -0
- data/vendor/assets/javascripts/jsts/algorithm/RobustLineIntersector.js +477 -0
- data/vendor/assets/javascripts/jsts/algorithm/distance/DiscreteHausdorffDistance.js +228 -0
- data/vendor/assets/javascripts/jsts/algorithm/distance/DistanceToPoint.js +68 -0
- data/vendor/assets/javascripts/jsts/algorithm/distance/PointPairDistance.js +104 -0
- data/vendor/assets/javascripts/jsts/algorithm/locate/PointOnGeometryLocator.js +7 -0
- data/vendor/assets/javascripts/jsts/algorithm/locate/SimplePointInAreaLocator.js +102 -0
- data/vendor/assets/javascripts/jsts/geom/Coordinate.js +158 -0
- data/vendor/assets/javascripts/jsts/geom/CoordinateArrays.js +148 -0
- data/vendor/assets/javascripts/jsts/geom/CoordinateFilter.js +29 -0
- data/vendor/assets/javascripts/jsts/geom/CoordinateList.js +157 -0
- data/vendor/assets/javascripts/jsts/geom/CoordinateSequenceFilter.js +63 -0
- data/vendor/assets/javascripts/jsts/geom/Dimension.js +137 -0
- data/vendor/assets/javascripts/jsts/geom/Envelope.js +833 -0
- data/vendor/assets/javascripts/jsts/geom/Geometry.js +1535 -0
- data/vendor/assets/javascripts/jsts/geom/GeometryCollection.js +230 -0
- data/vendor/assets/javascripts/jsts/geom/GeometryComponentFilter.js +36 -0
- data/vendor/assets/javascripts/jsts/geom/GeometryFactory.js +263 -0
- data/vendor/assets/javascripts/jsts/geom/GeometryFilter.js +29 -0
- data/vendor/assets/javascripts/jsts/geom/IntersectionMatrix.js +650 -0
- data/vendor/assets/javascripts/jsts/geom/LineSegment.js +275 -0
- data/vendor/assets/javascripts/jsts/geom/LineString.js +299 -0
- data/vendor/assets/javascripts/jsts/geom/LinearRing.js +69 -0
- data/vendor/assets/javascripts/jsts/geom/Location.js +83 -0
- data/vendor/assets/javascripts/jsts/geom/MultiLineString.js +47 -0
- data/vendor/assets/javascripts/jsts/geom/MultiPoint.js +64 -0
- data/vendor/assets/javascripts/jsts/geom/MultiPolygon.js +64 -0
- data/vendor/assets/javascripts/jsts/geom/Point.js +197 -0
- data/vendor/assets/javascripts/jsts/geom/Polygon.js +263 -0
- data/vendor/assets/javascripts/jsts/geom/PrecisionModel.js +187 -0
- data/vendor/assets/javascripts/jsts/geom/Triangle.js +313 -0
- data/vendor/assets/javascripts/jsts/geom/util/GeometryCombiner.js +143 -0
- data/vendor/assets/javascripts/jsts/geom/util/GeometryExtracter.js +76 -0
- data/vendor/assets/javascripts/jsts/geom/util/GeometryTransformer.js +295 -0
- data/vendor/assets/javascripts/jsts/geom/util/LinearComponentExtracter.js +207 -0
- data/vendor/assets/javascripts/jsts/geom/util/PointExtracter.js +67 -0
- data/vendor/assets/javascripts/jsts/geom/util/PolygonExtracter.js +71 -0
- data/vendor/assets/javascripts/jsts/geomgraph/Depth.js +145 -0
- data/vendor/assets/javascripts/jsts/geomgraph/DirectedEdge.js +270 -0
- data/vendor/assets/javascripts/jsts/geomgraph/DirectedEdgeStar.js +388 -0
- data/vendor/assets/javascripts/jsts/geomgraph/Edge.js +291 -0
- data/vendor/assets/javascripts/jsts/geomgraph/EdgeEnd.js +188 -0
- data/vendor/assets/javascripts/jsts/geomgraph/EdgeEndStar.js +322 -0
- data/vendor/assets/javascripts/jsts/geomgraph/EdgeIntersection.js +122 -0
- data/vendor/assets/javascripts/jsts/geomgraph/EdgeIntersectionList.js +146 -0
- data/vendor/assets/javascripts/jsts/geomgraph/EdgeList.js +111 -0
- data/vendor/assets/javascripts/jsts/geomgraph/EdgeNodingValidator.js +76 -0
- data/vendor/assets/javascripts/jsts/geomgraph/EdgeRing.js +230 -0
- data/vendor/assets/javascripts/jsts/geomgraph/GeometryGraph.js +469 -0
- data/vendor/assets/javascripts/jsts/geomgraph/GraphComponent.js +181 -0
- data/vendor/assets/javascripts/jsts/geomgraph/Label.js +316 -0
- data/vendor/assets/javascripts/jsts/geomgraph/Node.js +105 -0
- data/vendor/assets/javascripts/jsts/geomgraph/NodeFactory.js +22 -0
- data/vendor/assets/javascripts/jsts/geomgraph/NodeMap.js +128 -0
- data/vendor/assets/javascripts/jsts/geomgraph/PlanarGraph.js +214 -0
- data/vendor/assets/javascripts/jsts/geomgraph/Position.js +63 -0
- data/vendor/assets/javascripts/jsts/geomgraph/Quadrant.js +143 -0
- data/vendor/assets/javascripts/jsts/geomgraph/TopologyLocation.js +251 -0
- data/vendor/assets/javascripts/jsts/geomgraph/index/EdgeSetIntersector.js +47 -0
- data/vendor/assets/javascripts/jsts/geomgraph/index/SegmentIntersector.js +298 -0
- data/vendor/assets/javascripts/jsts/geomgraph/index/SimpleEdgeSetIntersector.js +107 -0
- data/vendor/assets/javascripts/jsts/geomgraph/index/SimpleMCSweepLineIntersector.js +29 -0
- data/vendor/assets/javascripts/jsts/index/ArrayListVisitor.js +37 -0
- data/vendor/assets/javascripts/jsts/index/DoubleBits.js +132 -0
- data/vendor/assets/javascripts/jsts/index/IntervalSize.js +55 -0
- data/vendor/assets/javascripts/jsts/index/ItemVisitor.js +23 -0
- data/vendor/assets/javascripts/jsts/index/SpatialIndex.js +67 -0
- data/vendor/assets/javascripts/jsts/index/bintree/Bintree.js +224 -0
- data/vendor/assets/javascripts/jsts/index/bintree/Interval.js +160 -0
- data/vendor/assets/javascripts/jsts/index/bintree/Key.js +110 -0
- data/vendor/assets/javascripts/jsts/index/bintree/Node.js +204 -0
- data/vendor/assets/javascripts/jsts/index/bintree/NodeBase.js +220 -0
- data/vendor/assets/javascripts/jsts/index/bintree/Root.js +113 -0
- data/vendor/assets/javascripts/jsts/index/chain/MonotoneChain.js +244 -0
- data/vendor/assets/javascripts/jsts/index/chain/MonotoneChainBuilder.js +106 -0
- data/vendor/assets/javascripts/jsts/index/chain/MonotoneChainOverlapAction.js +56 -0
- data/vendor/assets/javascripts/jsts/index/chain/MonotoneChainSelectAction.js +44 -0
- data/vendor/assets/javascripts/jsts/index/kdtree/KdNode.js +171 -0
- data/vendor/assets/javascripts/jsts/index/kdtree/KdTree.js +218 -0
- data/vendor/assets/javascripts/jsts/index/quadtree/Key.js +134 -0
- data/vendor/assets/javascripts/jsts/index/quadtree/Node.js +220 -0
- data/vendor/assets/javascripts/jsts/index/quadtree/NodeBase.js +330 -0
- data/vendor/assets/javascripts/jsts/index/quadtree/Quadtree.js +228 -0
- data/vendor/assets/javascripts/jsts/index/quadtree/Root.js +105 -0
- data/vendor/assets/javascripts/jsts/index/strtree/AbstractNode.js +107 -0
- data/vendor/assets/javascripts/jsts/index/strtree/AbstractSTRtree.js +594 -0
- data/vendor/assets/javascripts/jsts/index/strtree/Boundable.js +37 -0
- data/vendor/assets/javascripts/jsts/index/strtree/BoundablePair.js +0 -0
- data/vendor/assets/javascripts/jsts/index/strtree/Interval.js +94 -0
- data/vendor/assets/javascripts/jsts/index/strtree/ItemBoundable.js +60 -0
- data/vendor/assets/javascripts/jsts/index/strtree/SIRtree.js +122 -0
- data/vendor/assets/javascripts/jsts/index/strtree/STRtree.js +450 -0
- data/vendor/assets/javascripts/jsts/io/GeoJSONParser.js +471 -0
- data/vendor/assets/javascripts/jsts/io/GeoJSONReader.js +58 -0
- data/vendor/assets/javascripts/jsts/io/GeoJSONWriter.js +38 -0
- data/vendor/assets/javascripts/jsts/io/OpenLayersParser.js +245 -0
- data/vendor/assets/javascripts/jsts/io/WKTParser.js +421 -0
- data/vendor/assets/javascripts/jsts/io/WKTReader.js +68 -0
- data/vendor/assets/javascripts/jsts/io/WKTWriter.js +61 -0
- data/vendor/assets/javascripts/jsts/noding/BasicSegmentString.js +87 -0
- data/vendor/assets/javascripts/jsts/noding/FastNodingValidator.js +127 -0
- data/vendor/assets/javascripts/jsts/noding/InteriorIntersectionFinder.js +171 -0
- data/vendor/assets/javascripts/jsts/noding/IntersectionAdder.js +198 -0
- data/vendor/assets/javascripts/jsts/noding/IntersectionFinderAdder.js +79 -0
- data/vendor/assets/javascripts/jsts/noding/MCIndexNoder.js +147 -0
- data/vendor/assets/javascripts/jsts/noding/NodableSegmentString.js +35 -0
- data/vendor/assets/javascripts/jsts/noding/NodedSegmentString.js +235 -0
- data/vendor/assets/javascripts/jsts/noding/Noder.js +41 -0
- data/vendor/assets/javascripts/jsts/noding/NodingValidator.js +5 -0
- data/vendor/assets/javascripts/jsts/noding/Octant.js +84 -0
- data/vendor/assets/javascripts/jsts/noding/OrientedCoordinateArray.js +94 -0
- data/vendor/assets/javascripts/jsts/noding/ScaledNoder.js +105 -0
- data/vendor/assets/javascripts/jsts/noding/SegmentIntersector.js +45 -0
- data/vendor/assets/javascripts/jsts/noding/SegmentNode.js +70 -0
- data/vendor/assets/javascripts/jsts/noding/SegmentNodeList.js +262 -0
- data/vendor/assets/javascripts/jsts/noding/SegmentPointComparator.js +78 -0
- data/vendor/assets/javascripts/jsts/noding/SegmentString.js +61 -0
- data/vendor/assets/javascripts/jsts/noding/SinglePassNoder.js +51 -0
- data/vendor/assets/javascripts/jsts/noding/snapround/HotPixel.js +271 -0
- data/vendor/assets/javascripts/jsts/noding/snapround/MCIndexPointSnapper.js +96 -0
- data/vendor/assets/javascripts/jsts/noding/snapround/MCIndexSnapRounder.js +147 -0
- data/vendor/assets/javascripts/jsts/operation/BoundaryOp.js +166 -0
- data/vendor/assets/javascripts/jsts/operation/GeometryGraphOperation.js +90 -0
- data/vendor/assets/javascripts/jsts/operation/IsSimpleOp.js +293 -0
- data/vendor/assets/javascripts/jsts/operation/buffer/BufferBuilder.js +317 -0
- data/vendor/assets/javascripts/jsts/operation/buffer/BufferInputLineSimplifier.js +294 -0
- data/vendor/assets/javascripts/jsts/operation/buffer/BufferOp.js +340 -0
- data/vendor/assets/javascripts/jsts/operation/buffer/BufferParameters.js +328 -0
- data/vendor/assets/javascripts/jsts/operation/buffer/BufferSubgraph.js +296 -0
- data/vendor/assets/javascripts/jsts/operation/buffer/OffsetCurveBuilder.js +369 -0
- data/vendor/assets/javascripts/jsts/operation/buffer/OffsetCurveSetBuilder.js +301 -0
- data/vendor/assets/javascripts/jsts/operation/buffer/OffsetSegmentGenerator.js +777 -0
- data/vendor/assets/javascripts/jsts/operation/buffer/OffsetSegmentString.js +109 -0
- data/vendor/assets/javascripts/jsts/operation/buffer/RightmostEdgeFinder.js +164 -0
- data/vendor/assets/javascripts/jsts/operation/buffer/SubgraphDepthLocater.js +220 -0
- data/vendor/assets/javascripts/jsts/operation/distance/ConnectedElementLocationFilter.js +67 -0
- data/vendor/assets/javascripts/jsts/operation/distance/DistanceOp.js +506 -0
- data/vendor/assets/javascripts/jsts/operation/distance/GeometryLocation.js +102 -0
- data/vendor/assets/javascripts/jsts/operation/overlay/LineBuilder.js +194 -0
- data/vendor/assets/javascripts/jsts/operation/overlay/MaximalEdgeRing.js +72 -0
- data/vendor/assets/javascripts/jsts/operation/overlay/MinimalEdgeRing.js +33 -0
- data/vendor/assets/javascripts/jsts/operation/overlay/OverlayNodeFactory.js +26 -0
- data/vendor/assets/javascripts/jsts/operation/overlay/OverlayOp.js +584 -0
- data/vendor/assets/javascripts/jsts/operation/overlay/PointBuilder.js +103 -0
- data/vendor/assets/javascripts/jsts/operation/overlay/PolygonBuilder.js +282 -0
- data/vendor/assets/javascripts/jsts/operation/overlay/snap/GeometrySnapper.js +228 -0
- data/vendor/assets/javascripts/jsts/operation/overlay/snap/LineStringSnapper.js +228 -0
- data/vendor/assets/javascripts/jsts/operation/overlay/snap/SnapIfNeededOverlayOp.js +85 -0
- data/vendor/assets/javascripts/jsts/operation/overlay/snap/SnapOverlayOp.js +134 -0
- data/vendor/assets/javascripts/jsts/operation/polygonize/EdgeRing.js +259 -0
- data/vendor/assets/javascripts/jsts/operation/polygonize/PolygonizeDirectedEdge.js +94 -0
- data/vendor/assets/javascripts/jsts/operation/polygonize/PolygonizeEdge.js +31 -0
- data/vendor/assets/javascripts/jsts/operation/polygonize/PolygonizeGraph.js +507 -0
- data/vendor/assets/javascripts/jsts/operation/polygonize/Polygonizer.js +259 -0
- data/vendor/assets/javascripts/jsts/operation/relate/EdgeEndBuilder.js +140 -0
- data/vendor/assets/javascripts/jsts/operation/relate/EdgeEndBundle.js +183 -0
- data/vendor/assets/javascripts/jsts/operation/relate/EdgeEndBundleStar.js +48 -0
- data/vendor/assets/javascripts/jsts/operation/relate/RelateComputer.js +444 -0
- data/vendor/assets/javascripts/jsts/operation/relate/RelateNode.js +46 -0
- data/vendor/assets/javascripts/jsts/operation/relate/RelateNodeFactory.js +25 -0
- data/vendor/assets/javascripts/jsts/operation/relate/RelateNodeGraph.js +118 -0
- data/vendor/assets/javascripts/jsts/operation/relate/RelateOp.js +75 -0
- data/vendor/assets/javascripts/jsts/operation/union/CascadedPolygonUnion.js +319 -0
- data/vendor/assets/javascripts/jsts/operation/union/PointGeometryUnion.js +118 -0
- data/vendor/assets/javascripts/jsts/operation/union/UnaryUnionOp.js +244 -0
- data/vendor/assets/javascripts/jsts/operation/union/UnionInteracting.js +156 -0
- data/vendor/assets/javascripts/jsts/operation/valid/ConnectedInteriorTester.js +259 -0
- data/vendor/assets/javascripts/jsts/operation/valid/ConsistentAreaTester.js +127 -0
- data/vendor/assets/javascripts/jsts/operation/valid/IndexedNestedRingTester.js +89 -0
- data/vendor/assets/javascripts/jsts/operation/valid/IsValidOp.js +619 -0
- data/vendor/assets/javascripts/jsts/operation/valid/TopologyValidationError.js +199 -0
- data/vendor/assets/javascripts/jsts/planargraph/DirectedEdge.js +232 -0
- data/vendor/assets/javascripts/jsts/planargraph/DirectedEdgeStar.js +168 -0
- data/vendor/assets/javascripts/jsts/planargraph/Edge.js +124 -0
- data/vendor/assets/javascripts/jsts/planargraph/GraphComponent.js +182 -0
- data/vendor/assets/javascripts/jsts/planargraph/Node.js +127 -0
- data/vendor/assets/javascripts/jsts/planargraph/NodeMap.js +76 -0
- data/vendor/assets/javascripts/jsts/planargraph/PlanarGraph.js +246 -0
- data/vendor/assets/javascripts/jsts/simplify/LineSegmentIndex.js +101 -0
- data/vendor/assets/javascripts/jsts/triangulate/DelaunayTriangulationBuilder.js +224 -0
- data/vendor/assets/javascripts/jsts/triangulate/IncrementalDelaunayTriangulator.js +111 -0
- data/vendor/assets/javascripts/jsts/triangulate/VoronoiDiagramBuilder.js +172 -0
- data/vendor/assets/javascripts/jsts/triangulate/quadedge/LastFoundQuadEdgeLocator.js +52 -0
- data/vendor/assets/javascripts/jsts/triangulate/quadedge/QuadEdge.js +437 -0
- data/vendor/assets/javascripts/jsts/triangulate/quadedge/QuadEdgeSubdivision.js +1064 -0
- data/vendor/assets/javascripts/jsts/triangulate/quadedge/TrianglePredicate.js +350 -0
- data/vendor/assets/javascripts/jsts/triangulate/quadedge/Vertex.js +496 -0
- data/vendor/assets/javascripts/jsts/util/Assert.js +80 -0
- data/vendor/assets/javascripts/jsts/util/AssertionFailedException.js +23 -0
- data/vendor/assets/javascripts/jsts/util/UniqueCoordinateArrayFilter.js +52 -0
- metadata +204 -1
@@ -0,0 +1,80 @@
|
|
1
|
+
/* Copyright (c) 2011 by The Authors.
|
2
|
+
* Published under the LGPL 2.1 license.
|
3
|
+
* See /license-notice.txt for the full text of the license notice.
|
4
|
+
* See /license.txt for the full text of the license.
|
5
|
+
*/
|
6
|
+
|
7
|
+
(function() {
|
8
|
+
|
9
|
+
/**
|
10
|
+
* @requires jsts/util/AssertionFailedException.js
|
11
|
+
*/
|
12
|
+
|
13
|
+
var AssertionFailedException = jsts.util.AssertionFailedException;
|
14
|
+
|
15
|
+
/**
|
16
|
+
* A utility for making programming assertions.
|
17
|
+
*
|
18
|
+
* @constructor
|
19
|
+
* @name jsts.util.Assert
|
20
|
+
*/
|
21
|
+
jsts.util.Assert = function() {};
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Throws an <code>AssertionFailedException</code> with the given message if
|
25
|
+
* the given assertion is not true.
|
26
|
+
*
|
27
|
+
* @param {boolean}
|
28
|
+
* assertion a condition that is supposed to be true.
|
29
|
+
* @param {String=}
|
30
|
+
* message a description of the assertion.
|
31
|
+
* @throws AssertionFailedException
|
32
|
+
* if the condition is false
|
33
|
+
*/
|
34
|
+
jsts.util.Assert.isTrue = function(assertion, message) {
|
35
|
+
if (!assertion) {
|
36
|
+
if (message === null) {
|
37
|
+
throw new AssertionFailedException();
|
38
|
+
} else {
|
39
|
+
throw new AssertionFailedException(message);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
};
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Throws an <code>AssertionFailedException</code> with the given message if
|
46
|
+
* the given objects are not equal, according to the <code>equals</code>
|
47
|
+
* method.
|
48
|
+
*
|
49
|
+
* @param expectedValue
|
50
|
+
* the correct value.
|
51
|
+
* @param actualValue
|
52
|
+
* the value being checked.
|
53
|
+
* @param {string=}
|
54
|
+
* message a description of the assertion.
|
55
|
+
* @throws AssertionFailedException
|
56
|
+
* if the two objects are not equal
|
57
|
+
*/
|
58
|
+
jsts.util.Assert.equals = function(expectedValue, actualValue, message) {
|
59
|
+
if (!actualValue.equals(expectedValue)) {
|
60
|
+
throw new AssertionFailedException('Expected ' + expectedValue +
|
61
|
+
' but encountered ' + actualValue +
|
62
|
+
(message != null ? ': ' + message : ''));
|
63
|
+
}
|
64
|
+
};
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Always throws an <code>AssertionFailedException</code> with the given
|
68
|
+
* message.
|
69
|
+
*
|
70
|
+
* @param {string=}
|
71
|
+
* message a description of the assertion.
|
72
|
+
* @throws AssertionFailedException
|
73
|
+
* thrown always
|
74
|
+
*/
|
75
|
+
jsts.util.Assert.shouldNeverReachHere = function(message) {
|
76
|
+
throw new AssertionFailedException('Should never reach here' +
|
77
|
+
(message != null ? ': ' + message : ''));
|
78
|
+
};
|
79
|
+
|
80
|
+
})();
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/* Copyright (c) 2011 by The Authors.
|
2
|
+
* Published under the LGPL 2.1 license.
|
3
|
+
* See /license-notice.txt for the full text of the license notice.
|
4
|
+
* See /license.txt for the full text of the license.
|
5
|
+
*/
|
6
|
+
|
7
|
+
(function() {
|
8
|
+
|
9
|
+
/**
|
10
|
+
* Thrown when the application is in an inconsistent state. Indicates a
|
11
|
+
* problem with the code.
|
12
|
+
*
|
13
|
+
* @constructor
|
14
|
+
*/
|
15
|
+
var AssertionFailedException = function(message) {
|
16
|
+
this.message = message;
|
17
|
+
};
|
18
|
+
AssertionFailedException.prototype = new Error();
|
19
|
+
AssertionFailedException.prototype.name = 'AssertionFailedException';
|
20
|
+
|
21
|
+
jsts.util.AssertionFailedException = AssertionFailedException;
|
22
|
+
|
23
|
+
})();
|
@@ -0,0 +1,52 @@
|
|
1
|
+
/* Copyright (c) 2011 by The Authors.
|
2
|
+
* Published under the LGPL 2.1 license.
|
3
|
+
* See /license-notice.txt for the full text of the license notice.
|
4
|
+
* See /license.txt for the full text of the license.
|
5
|
+
*/
|
6
|
+
|
7
|
+
(function() {
|
8
|
+
|
9
|
+
/**
|
10
|
+
* @requires jsts/geom/CoordinateFilter.js
|
11
|
+
*/
|
12
|
+
|
13
|
+
var ArrayList = javascript.util.ArrayList;
|
14
|
+
var TreeSet = javascript.util.TreeSet;
|
15
|
+
|
16
|
+
var CoordinateFilter = jsts.geom.CoordinateFilter;
|
17
|
+
|
18
|
+
/**
|
19
|
+
* A {@link CoordinateFilter} that builds a set of <code>Coordinate</code>s.
|
20
|
+
* The set of coordinates contains no duplicate points.
|
21
|
+
*
|
22
|
+
* @constructor
|
23
|
+
*/
|
24
|
+
jsts.util.UniqueCoordinateArrayFilter = function() {
|
25
|
+
this.treeSet = new TreeSet();
|
26
|
+
this.list = new ArrayList();
|
27
|
+
};
|
28
|
+
|
29
|
+
|
30
|
+
jsts.util.UniqueCoordinateArrayFilter.prototype = new CoordinateFilter();
|
31
|
+
|
32
|
+
jsts.util.UniqueCoordinateArrayFilter.prototype.treeSet = null;
|
33
|
+
jsts.util.UniqueCoordinateArrayFilter.prototype.list = null;
|
34
|
+
|
35
|
+
|
36
|
+
/**
|
37
|
+
* Returns the gathered <code>Coordinate</code>s.
|
38
|
+
*
|
39
|
+
* @return the <code>Coordinate</code>s collected by this
|
40
|
+
* <code>CoordinateArrayFilter.</code>
|
41
|
+
*/
|
42
|
+
jsts.util.UniqueCoordinateArrayFilter.prototype.getCoordinates = function() {
|
43
|
+
return this.list.toArray();
|
44
|
+
};
|
45
|
+
|
46
|
+
jsts.util.UniqueCoordinateArrayFilter.prototype.filter = function(coord) {
|
47
|
+
if (!this.treeSet.contains(coord)) {
|
48
|
+
this.list.add(coord);
|
49
|
+
this.treeSet.add(coord);
|
50
|
+
}
|
51
|
+
};
|
52
|
+
})();
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsts-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michał Lipski
|
@@ -56,6 +56,209 @@ files:
|
|
56
56
|
- vendor/assets/javascripts/javascript.util.js
|
57
57
|
- vendor/assets/javascripts/jsts-original.js
|
58
58
|
- vendor/assets/javascripts/jsts.js
|
59
|
+
- vendor/assets/javascripts/jsts/algorithm/Angle.js
|
60
|
+
- vendor/assets/javascripts/jsts/algorithm/BoundaryNodeRule.js
|
61
|
+
- vendor/assets/javascripts/jsts/algorithm/CGAlgorithms.js
|
62
|
+
- vendor/assets/javascripts/jsts/algorithm/CentralEndpointIntersector.js
|
63
|
+
- vendor/assets/javascripts/jsts/algorithm/CentroidArea.js
|
64
|
+
- vendor/assets/javascripts/jsts/algorithm/CentroidLine.js
|
65
|
+
- vendor/assets/javascripts/jsts/algorithm/CentroidPoint.js
|
66
|
+
- vendor/assets/javascripts/jsts/algorithm/ConvexHull.js
|
67
|
+
- vendor/assets/javascripts/jsts/algorithm/HCoordinate.js
|
68
|
+
- vendor/assets/javascripts/jsts/algorithm/LineIntersector.js
|
69
|
+
- vendor/assets/javascripts/jsts/algorithm/MCPointInRing.js
|
70
|
+
- vendor/assets/javascripts/jsts/algorithm/PointLocator.js
|
71
|
+
- vendor/assets/javascripts/jsts/algorithm/RayCrossingCounter.js
|
72
|
+
- vendor/assets/javascripts/jsts/algorithm/RobustDeterminant.js
|
73
|
+
- vendor/assets/javascripts/jsts/algorithm/RobustLineIntersector.js
|
74
|
+
- vendor/assets/javascripts/jsts/algorithm/distance/DiscreteHausdorffDistance.js
|
75
|
+
- vendor/assets/javascripts/jsts/algorithm/distance/DistanceToPoint.js
|
76
|
+
- vendor/assets/javascripts/jsts/algorithm/distance/PointPairDistance.js
|
77
|
+
- vendor/assets/javascripts/jsts/algorithm/locate/PointOnGeometryLocator.js
|
78
|
+
- vendor/assets/javascripts/jsts/algorithm/locate/SimplePointInAreaLocator.js
|
79
|
+
- vendor/assets/javascripts/jsts/geom/Coordinate.js
|
80
|
+
- vendor/assets/javascripts/jsts/geom/CoordinateArrays.js
|
81
|
+
- vendor/assets/javascripts/jsts/geom/CoordinateFilter.js
|
82
|
+
- vendor/assets/javascripts/jsts/geom/CoordinateList.js
|
83
|
+
- vendor/assets/javascripts/jsts/geom/CoordinateSequenceFilter.js
|
84
|
+
- vendor/assets/javascripts/jsts/geom/Dimension.js
|
85
|
+
- vendor/assets/javascripts/jsts/geom/Envelope.js
|
86
|
+
- vendor/assets/javascripts/jsts/geom/Geometry.js
|
87
|
+
- vendor/assets/javascripts/jsts/geom/GeometryCollection.js
|
88
|
+
- vendor/assets/javascripts/jsts/geom/GeometryComponentFilter.js
|
89
|
+
- vendor/assets/javascripts/jsts/geom/GeometryFactory.js
|
90
|
+
- vendor/assets/javascripts/jsts/geom/GeometryFilter.js
|
91
|
+
- vendor/assets/javascripts/jsts/geom/IntersectionMatrix.js
|
92
|
+
- vendor/assets/javascripts/jsts/geom/LineSegment.js
|
93
|
+
- vendor/assets/javascripts/jsts/geom/LineString.js
|
94
|
+
- vendor/assets/javascripts/jsts/geom/LinearRing.js
|
95
|
+
- vendor/assets/javascripts/jsts/geom/Location.js
|
96
|
+
- vendor/assets/javascripts/jsts/geom/MultiLineString.js
|
97
|
+
- vendor/assets/javascripts/jsts/geom/MultiPoint.js
|
98
|
+
- vendor/assets/javascripts/jsts/geom/MultiPolygon.js
|
99
|
+
- vendor/assets/javascripts/jsts/geom/Point.js
|
100
|
+
- vendor/assets/javascripts/jsts/geom/Polygon.js
|
101
|
+
- vendor/assets/javascripts/jsts/geom/PrecisionModel.js
|
102
|
+
- vendor/assets/javascripts/jsts/geom/Triangle.js
|
103
|
+
- vendor/assets/javascripts/jsts/geom/util/GeometryCombiner.js
|
104
|
+
- vendor/assets/javascripts/jsts/geom/util/GeometryExtracter.js
|
105
|
+
- vendor/assets/javascripts/jsts/geom/util/GeometryTransformer.js
|
106
|
+
- vendor/assets/javascripts/jsts/geom/util/LinearComponentExtracter.js
|
107
|
+
- vendor/assets/javascripts/jsts/geom/util/PointExtracter.js
|
108
|
+
- vendor/assets/javascripts/jsts/geom/util/PolygonExtracter.js
|
109
|
+
- vendor/assets/javascripts/jsts/geomgraph/Depth.js
|
110
|
+
- vendor/assets/javascripts/jsts/geomgraph/DirectedEdge.js
|
111
|
+
- vendor/assets/javascripts/jsts/geomgraph/DirectedEdgeStar.js
|
112
|
+
- vendor/assets/javascripts/jsts/geomgraph/Edge.js
|
113
|
+
- vendor/assets/javascripts/jsts/geomgraph/EdgeEnd.js
|
114
|
+
- vendor/assets/javascripts/jsts/geomgraph/EdgeEndStar.js
|
115
|
+
- vendor/assets/javascripts/jsts/geomgraph/EdgeIntersection.js
|
116
|
+
- vendor/assets/javascripts/jsts/geomgraph/EdgeIntersectionList.js
|
117
|
+
- vendor/assets/javascripts/jsts/geomgraph/EdgeList.js
|
118
|
+
- vendor/assets/javascripts/jsts/geomgraph/EdgeNodingValidator.js
|
119
|
+
- vendor/assets/javascripts/jsts/geomgraph/EdgeRing.js
|
120
|
+
- vendor/assets/javascripts/jsts/geomgraph/GeometryGraph.js
|
121
|
+
- vendor/assets/javascripts/jsts/geomgraph/GraphComponent.js
|
122
|
+
- vendor/assets/javascripts/jsts/geomgraph/Label.js
|
123
|
+
- vendor/assets/javascripts/jsts/geomgraph/Node.js
|
124
|
+
- vendor/assets/javascripts/jsts/geomgraph/NodeFactory.js
|
125
|
+
- vendor/assets/javascripts/jsts/geomgraph/NodeMap.js
|
126
|
+
- vendor/assets/javascripts/jsts/geomgraph/PlanarGraph.js
|
127
|
+
- vendor/assets/javascripts/jsts/geomgraph/Position.js
|
128
|
+
- vendor/assets/javascripts/jsts/geomgraph/Quadrant.js
|
129
|
+
- vendor/assets/javascripts/jsts/geomgraph/TopologyLocation.js
|
130
|
+
- vendor/assets/javascripts/jsts/geomgraph/index/EdgeSetIntersector.js
|
131
|
+
- vendor/assets/javascripts/jsts/geomgraph/index/SegmentIntersector.js
|
132
|
+
- vendor/assets/javascripts/jsts/geomgraph/index/SimpleEdgeSetIntersector.js
|
133
|
+
- vendor/assets/javascripts/jsts/geomgraph/index/SimpleMCSweepLineIntersector.js
|
134
|
+
- vendor/assets/javascripts/jsts/index/ArrayListVisitor.js
|
135
|
+
- vendor/assets/javascripts/jsts/index/DoubleBits.js
|
136
|
+
- vendor/assets/javascripts/jsts/index/IntervalSize.js
|
137
|
+
- vendor/assets/javascripts/jsts/index/ItemVisitor.js
|
138
|
+
- vendor/assets/javascripts/jsts/index/SpatialIndex.js
|
139
|
+
- vendor/assets/javascripts/jsts/index/bintree/Bintree.js
|
140
|
+
- vendor/assets/javascripts/jsts/index/bintree/Interval.js
|
141
|
+
- vendor/assets/javascripts/jsts/index/bintree/Key.js
|
142
|
+
- vendor/assets/javascripts/jsts/index/bintree/Node.js
|
143
|
+
- vendor/assets/javascripts/jsts/index/bintree/NodeBase.js
|
144
|
+
- vendor/assets/javascripts/jsts/index/bintree/Root.js
|
145
|
+
- vendor/assets/javascripts/jsts/index/chain/MonotoneChain.js
|
146
|
+
- vendor/assets/javascripts/jsts/index/chain/MonotoneChainBuilder.js
|
147
|
+
- vendor/assets/javascripts/jsts/index/chain/MonotoneChainOverlapAction.js
|
148
|
+
- vendor/assets/javascripts/jsts/index/chain/MonotoneChainSelectAction.js
|
149
|
+
- vendor/assets/javascripts/jsts/index/kdtree/KdNode.js
|
150
|
+
- vendor/assets/javascripts/jsts/index/kdtree/KdTree.js
|
151
|
+
- vendor/assets/javascripts/jsts/index/quadtree/Key.js
|
152
|
+
- vendor/assets/javascripts/jsts/index/quadtree/Node.js
|
153
|
+
- vendor/assets/javascripts/jsts/index/quadtree/NodeBase.js
|
154
|
+
- vendor/assets/javascripts/jsts/index/quadtree/Quadtree.js
|
155
|
+
- vendor/assets/javascripts/jsts/index/quadtree/Root.js
|
156
|
+
- vendor/assets/javascripts/jsts/index/strtree/AbstractNode.js
|
157
|
+
- vendor/assets/javascripts/jsts/index/strtree/AbstractSTRtree.js
|
158
|
+
- vendor/assets/javascripts/jsts/index/strtree/Boundable.js
|
159
|
+
- vendor/assets/javascripts/jsts/index/strtree/BoundablePair.js
|
160
|
+
- vendor/assets/javascripts/jsts/index/strtree/Interval.js
|
161
|
+
- vendor/assets/javascripts/jsts/index/strtree/ItemBoundable.js
|
162
|
+
- vendor/assets/javascripts/jsts/index/strtree/SIRtree.js
|
163
|
+
- vendor/assets/javascripts/jsts/index/strtree/STRtree.js
|
164
|
+
- vendor/assets/javascripts/jsts/io/GeoJSONParser.js
|
165
|
+
- vendor/assets/javascripts/jsts/io/GeoJSONReader.js
|
166
|
+
- vendor/assets/javascripts/jsts/io/GeoJSONWriter.js
|
167
|
+
- vendor/assets/javascripts/jsts/io/OpenLayersParser.js
|
168
|
+
- vendor/assets/javascripts/jsts/io/WKTParser.js
|
169
|
+
- vendor/assets/javascripts/jsts/io/WKTReader.js
|
170
|
+
- vendor/assets/javascripts/jsts/io/WKTWriter.js
|
171
|
+
- vendor/assets/javascripts/jsts/noding/BasicSegmentString.js
|
172
|
+
- vendor/assets/javascripts/jsts/noding/FastNodingValidator.js
|
173
|
+
- vendor/assets/javascripts/jsts/noding/InteriorIntersectionFinder.js
|
174
|
+
- vendor/assets/javascripts/jsts/noding/IntersectionAdder.js
|
175
|
+
- vendor/assets/javascripts/jsts/noding/IntersectionFinderAdder.js
|
176
|
+
- vendor/assets/javascripts/jsts/noding/MCIndexNoder.js
|
177
|
+
- vendor/assets/javascripts/jsts/noding/NodableSegmentString.js
|
178
|
+
- vendor/assets/javascripts/jsts/noding/NodedSegmentString.js
|
179
|
+
- vendor/assets/javascripts/jsts/noding/Noder.js
|
180
|
+
- vendor/assets/javascripts/jsts/noding/NodingValidator.js
|
181
|
+
- vendor/assets/javascripts/jsts/noding/Octant.js
|
182
|
+
- vendor/assets/javascripts/jsts/noding/OrientedCoordinateArray.js
|
183
|
+
- vendor/assets/javascripts/jsts/noding/ScaledNoder.js
|
184
|
+
- vendor/assets/javascripts/jsts/noding/SegmentIntersector.js
|
185
|
+
- vendor/assets/javascripts/jsts/noding/SegmentNode.js
|
186
|
+
- vendor/assets/javascripts/jsts/noding/SegmentNodeList.js
|
187
|
+
- vendor/assets/javascripts/jsts/noding/SegmentPointComparator.js
|
188
|
+
- vendor/assets/javascripts/jsts/noding/SegmentString.js
|
189
|
+
- vendor/assets/javascripts/jsts/noding/SinglePassNoder.js
|
190
|
+
- vendor/assets/javascripts/jsts/noding/snapround/HotPixel.js
|
191
|
+
- vendor/assets/javascripts/jsts/noding/snapround/MCIndexPointSnapper.js
|
192
|
+
- vendor/assets/javascripts/jsts/noding/snapround/MCIndexSnapRounder.js
|
193
|
+
- vendor/assets/javascripts/jsts/operation/BoundaryOp.js
|
194
|
+
- vendor/assets/javascripts/jsts/operation/GeometryGraphOperation.js
|
195
|
+
- vendor/assets/javascripts/jsts/operation/IsSimpleOp.js
|
196
|
+
- vendor/assets/javascripts/jsts/operation/buffer/BufferBuilder.js
|
197
|
+
- vendor/assets/javascripts/jsts/operation/buffer/BufferInputLineSimplifier.js
|
198
|
+
- vendor/assets/javascripts/jsts/operation/buffer/BufferOp.js
|
199
|
+
- vendor/assets/javascripts/jsts/operation/buffer/BufferParameters.js
|
200
|
+
- vendor/assets/javascripts/jsts/operation/buffer/BufferSubgraph.js
|
201
|
+
- vendor/assets/javascripts/jsts/operation/buffer/OffsetCurveBuilder.js
|
202
|
+
- vendor/assets/javascripts/jsts/operation/buffer/OffsetCurveSetBuilder.js
|
203
|
+
- vendor/assets/javascripts/jsts/operation/buffer/OffsetSegmentGenerator.js
|
204
|
+
- vendor/assets/javascripts/jsts/operation/buffer/OffsetSegmentString.js
|
205
|
+
- vendor/assets/javascripts/jsts/operation/buffer/RightmostEdgeFinder.js
|
206
|
+
- vendor/assets/javascripts/jsts/operation/buffer/SubgraphDepthLocater.js
|
207
|
+
- vendor/assets/javascripts/jsts/operation/distance/ConnectedElementLocationFilter.js
|
208
|
+
- vendor/assets/javascripts/jsts/operation/distance/DistanceOp.js
|
209
|
+
- vendor/assets/javascripts/jsts/operation/distance/GeometryLocation.js
|
210
|
+
- vendor/assets/javascripts/jsts/operation/overlay/LineBuilder.js
|
211
|
+
- vendor/assets/javascripts/jsts/operation/overlay/MaximalEdgeRing.js
|
212
|
+
- vendor/assets/javascripts/jsts/operation/overlay/MinimalEdgeRing.js
|
213
|
+
- vendor/assets/javascripts/jsts/operation/overlay/OverlayNodeFactory.js
|
214
|
+
- vendor/assets/javascripts/jsts/operation/overlay/OverlayOp.js
|
215
|
+
- vendor/assets/javascripts/jsts/operation/overlay/PointBuilder.js
|
216
|
+
- vendor/assets/javascripts/jsts/operation/overlay/PolygonBuilder.js
|
217
|
+
- vendor/assets/javascripts/jsts/operation/overlay/snap/GeometrySnapper.js
|
218
|
+
- vendor/assets/javascripts/jsts/operation/overlay/snap/LineStringSnapper.js
|
219
|
+
- vendor/assets/javascripts/jsts/operation/overlay/snap/SnapIfNeededOverlayOp.js
|
220
|
+
- vendor/assets/javascripts/jsts/operation/overlay/snap/SnapOverlayOp.js
|
221
|
+
- vendor/assets/javascripts/jsts/operation/polygonize/EdgeRing.js
|
222
|
+
- vendor/assets/javascripts/jsts/operation/polygonize/PolygonizeDirectedEdge.js
|
223
|
+
- vendor/assets/javascripts/jsts/operation/polygonize/PolygonizeEdge.js
|
224
|
+
- vendor/assets/javascripts/jsts/operation/polygonize/PolygonizeGraph.js
|
225
|
+
- vendor/assets/javascripts/jsts/operation/polygonize/Polygonizer.js
|
226
|
+
- vendor/assets/javascripts/jsts/operation/relate/EdgeEndBuilder.js
|
227
|
+
- vendor/assets/javascripts/jsts/operation/relate/EdgeEndBundle.js
|
228
|
+
- vendor/assets/javascripts/jsts/operation/relate/EdgeEndBundleStar.js
|
229
|
+
- vendor/assets/javascripts/jsts/operation/relate/RelateComputer.js
|
230
|
+
- vendor/assets/javascripts/jsts/operation/relate/RelateNode.js
|
231
|
+
- vendor/assets/javascripts/jsts/operation/relate/RelateNodeFactory.js
|
232
|
+
- vendor/assets/javascripts/jsts/operation/relate/RelateNodeGraph.js
|
233
|
+
- vendor/assets/javascripts/jsts/operation/relate/RelateOp.js
|
234
|
+
- vendor/assets/javascripts/jsts/operation/union/CascadedPolygonUnion.js
|
235
|
+
- vendor/assets/javascripts/jsts/operation/union/PointGeometryUnion.js
|
236
|
+
- vendor/assets/javascripts/jsts/operation/union/UnaryUnionOp.js
|
237
|
+
- vendor/assets/javascripts/jsts/operation/union/UnionInteracting.js
|
238
|
+
- vendor/assets/javascripts/jsts/operation/valid/ConnectedInteriorTester.js
|
239
|
+
- vendor/assets/javascripts/jsts/operation/valid/ConsistentAreaTester.js
|
240
|
+
- vendor/assets/javascripts/jsts/operation/valid/IndexedNestedRingTester.js
|
241
|
+
- vendor/assets/javascripts/jsts/operation/valid/IsValidOp.js
|
242
|
+
- vendor/assets/javascripts/jsts/operation/valid/TopologyValidationError.js
|
243
|
+
- vendor/assets/javascripts/jsts/planargraph/DirectedEdge.js
|
244
|
+
- vendor/assets/javascripts/jsts/planargraph/DirectedEdgeStar.js
|
245
|
+
- vendor/assets/javascripts/jsts/planargraph/Edge.js
|
246
|
+
- vendor/assets/javascripts/jsts/planargraph/GraphComponent.js
|
247
|
+
- vendor/assets/javascripts/jsts/planargraph/Node.js
|
248
|
+
- vendor/assets/javascripts/jsts/planargraph/NodeMap.js
|
249
|
+
- vendor/assets/javascripts/jsts/planargraph/PlanarGraph.js
|
250
|
+
- vendor/assets/javascripts/jsts/simplify/LineSegmentIndex.js
|
251
|
+
- vendor/assets/javascripts/jsts/triangulate/DelaunayTriangulationBuilder.js
|
252
|
+
- vendor/assets/javascripts/jsts/triangulate/IncrementalDelaunayTriangulator.js
|
253
|
+
- vendor/assets/javascripts/jsts/triangulate/VoronoiDiagramBuilder.js
|
254
|
+
- vendor/assets/javascripts/jsts/triangulate/quadedge/LastFoundQuadEdgeLocator.js
|
255
|
+
- vendor/assets/javascripts/jsts/triangulate/quadedge/QuadEdge.js
|
256
|
+
- vendor/assets/javascripts/jsts/triangulate/quadedge/QuadEdgeSubdivision.js
|
257
|
+
- vendor/assets/javascripts/jsts/triangulate/quadedge/TrianglePredicate.js
|
258
|
+
- vendor/assets/javascripts/jsts/triangulate/quadedge/Vertex.js
|
259
|
+
- vendor/assets/javascripts/jsts/util/Assert.js
|
260
|
+
- vendor/assets/javascripts/jsts/util/AssertionFailedException.js
|
261
|
+
- vendor/assets/javascripts/jsts/util/UniqueCoordinateArrayFilter.js
|
59
262
|
homepage: http://github.com/rails-assets/jsts-rails
|
60
263
|
licenses:
|
61
264
|
- MIT
|