Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Commit

Permalink
Disabled a method in the LineStringSnapper, so that the project compi…
Browse files Browse the repository at this point in the history
…les. It looks like there's a missing implementation of CoordinateList.add().
  • Loading branch information
omar711 committed Feb 20, 2012
1 parent 5e67f69 commit 15dffde
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
13 changes: 13 additions & 0 deletions pom.xml
@@ -0,0 +1,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.vividsolutions</groupId>
<artifactId>jts</artifactId>
<version>1.8</version>


</project>

Expand Up @@ -109,6 +109,8 @@ private Coordinate findSnapForVertex(Coordinate pt, Coordinate[] snapPts)
*/ */
private void snapSegments(CoordinateList srcCoords, Coordinate[] snapPts) private void snapSegments(CoordinateList srcCoords, Coordinate[] snapPts)
{ {
throw new UnsupportedOperationException("Method disabled.");
/*
int distinctPtCount = snapPts.length; int distinctPtCount = snapPts.length;
// check for duplicate snap pts. // check for duplicate snap pts.
Expand All @@ -119,16 +121,14 @@ private void snapSegments(CoordinateList srcCoords, Coordinate[] snapPts)
for (int i = 0; i < distinctPtCount; i++) { for (int i = 0; i < distinctPtCount; i++) {
Coordinate snapPt = snapPts[i]; Coordinate snapPt = snapPts[i];
int index = findSegmentIndexToSnap(snapPt, srcCoords); int index = findSegmentIndexToSnap(snapPt, srcCoords);
/**
* If a segment to snap to was found, "crack" it at the snap pt. // If a segment to snap to was found, "crack" it at the snap pt. The new pt is inserted immediately into the src
* The new pt is inserted immediately into the src segment list, // segment list, so that subsequent snapping will take place on the latest segments. Duplicate points are not
* so that subsequent snapping will take place on the latest segments. // added.
* Duplicate points are not added. if (index >= 0) {
*/
if (index >= 0) {
srcCoords.add(index + 1, new Coordinate(snapPt), false); srcCoords.add(index + 1, new Coordinate(snapPt), false);
} }
} } */
} }




Expand Down

0 comments on commit 15dffde

Please sign in to comment.