Index: applications/editors/josm/plugins/opendata/.classpath
===================================================================
--- applications/editors/josm/plugins/opendata/.classpath	(revision 28245)
+++ applications/editors/josm/plugins/opendata/.classpath	(revision 28246)
@@ -15,6 +15,7 @@
 	<classpathentry kind="src" path="modules/fr.toulouse/resources"/>
 	<classpathentry kind="src" path="util"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_31"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
+	<classpathentry kind="lib" path="/JOSM/dist/jts.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Index: applications/editors/josm/plugins/opendata/build.xml
===================================================================
--- applications/editors/josm/plugins/opendata/build.xml	(revision 28245)
+++ applications/editors/josm/plugins/opendata/build.xml	(revision 28246)
@@ -31,4 +31,5 @@
     <!-- should not be necessary to change the following properties -->
     <property name="josm" location="../../core/dist/josm-custom.jar"/>
+    <property name="jts" location="../../dist/jts.jar"/>
     <property name="plugin.build.dir" value="build"/>
     <property name="plugin.src.dir" value="src"/>
@@ -93,6 +94,4 @@
     -->
     <target name="compile_geotools" depends="init">
-        <echo message="compiling JTS ... "/>
-        <javac srcdir="includes/com/vividsolutions/jts" debug="false" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="ISO-8859-1" />
         <echo message="compiling JSR-275 ... "/>
         <javac srcdir="includes/javax/measure" debug="false" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="UTF-8" />
@@ -100,12 +99,15 @@
         <javac srcdir="includes/javax/vecmath" debug="false" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="ISO-8859-1" />
         <echo message="compiling GeoTools ... "/>
-        <javac debug="true" sourcepath="" srcdir="includes" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="ISO-8859-1">
+        <javac debug="false" sourcepath="" srcdir="includes" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="ISO-8859-1">
             <include name="org/geotools/**/*.java"/>
         	<include name="org/opengis/**/*.java"/>
+            <classpath>
+                <pathelement location="${jts}"/>
+            </classpath>
         </javac>
     </target>
     <!--
     **********************************************************
-    ** compile_naptune - compiles Neptune classes
+    ** compile_neptune - compiles Neptune classes
     **********************************************************
     -->
@@ -125,4 +127,5 @@
         	    <pathelement path="${plugin.build.dir}"/>
                 <pathelement location="${josm}"/>
+                <pathelement location="${jts}"/>
             </classpath>
             <compilerarg value="-Xlint:deprecation"/>
@@ -177,5 +180,5 @@
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/OpenData"/>
                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
-                <!--<attribute name="Plugin-Requires" value="jts"/>-->
+                <attribute name="Plugin-Requires" value="jts"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/BoundaryNodeRule.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/BoundaryNodeRule.java	(revision 28245)
+++ 	(revision )
@@ -1,109 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-
-import com.vividsolutions.jts.geom.LineString;
-import com.vividsolutions.jts.geom.Lineal;
-import com.vividsolutions.jts.geom.LinearRing;
-import com.vividsolutions.jts.operation.IsSimpleOp;
-import com.vividsolutions.jts.operation.relate.RelateOp;
-
-/**
- * An interface for rules which determine whether node points
- * which are in boundaries of {@link Lineal} geometry components
- * are in the boundary of the parent geometry collection.
- * The SFS specifies a single kind of boundary node rule,
- * the {@link Mod2BoundaryNodeRule} rule.
- * However, other kinds of Boundary Node Rules are appropriate
- * in specific situations (for instance, linear network topology
- * usually follows the {@link EndPointBoundaryNodeRule}.)
- * Some JTS operations allow the BoundaryNodeRule to be specified,
- * and respect this rule when computing the results of the operation.
- *
- * @author Martin Davis
- * @version 1.7
- *
- * @see RelateOp
- * @see IsSimpleOp
- * @see PointLocator
- */
-public interface BoundaryNodeRule
-{
-
-	/**
-	 * Tests whether a point that lies in <tt>boundaryCount</tt>
-	 * geometry component boundaries is considered to form part of the boundary
-	 * of the parent geometry.
-	 * 
-	 * @param boundaryCount the number of component boundaries that this point occurs in
-	 * @return true if points in this number of boundaries lie in the parent boundary
-	 */
-  boolean isInBoundary(int boundaryCount);
-
-  /**
-   * The Mod-2 Boundary Node Rule (which is the rule specified in the OGC SFS).
-   * @see Mod2BoundaryNodeRule
-   */
-  public static final BoundaryNodeRule MOD2_BOUNDARY_RULE = new Mod2BoundaryNodeRule();
-
-  /**
-   * The Boundary Node Rule specified by the OGC Simple Features Specification,
-   * which is the same as the Mod-2 rule.
-   * @see Mod2BoundaryNodeRule
-   */
-  public static final BoundaryNodeRule OGC_SFS_BOUNDARY_RULE = MOD2_BOUNDARY_RULE;
-
-  /**
-   * A {@link BoundaryNodeRule} specifies that points are in the
-   * boundary of a lineal geometry iff
-   * the point lies on the boundary of an odd number
-   * of components.
-   * Under this rule {@link LinearRing}s and closed
-   * {@link LineString}s have an empty boundary.
-   * <p>
-   * This is the rule specified by the <i>OGC SFS</i>,
-   * and is the default rule used in JTS.
-   *
-   * @author Martin Davis
-   * @version 1.7
-   */
-  public static class Mod2BoundaryNodeRule
-      implements BoundaryNodeRule
-  {
-    public boolean isInBoundary(int boundaryCount)
-    {
-      // the "Mod-2 Rule"
-      return boundaryCount % 2 == 1;
-    }
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/CGAlgorithms.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/CGAlgorithms.java	(revision 28245)
+++ 	(revision )
@@ -1,452 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.CoordinateSequence;
-import com.vividsolutions.jts.geom.Location;
-
-/**
- * Specifies and implements various fundamental Computational Geometric algorithms.
- * The algorithms supplied in this class are robust for double-precision floating point.
- *
- * @version 1.7
- */
-public class CGAlgorithms
-{
-
-  /**
-   * A value that indicates an orientation of clockwise, or a right turn.
-   */
-  public static final int CLOCKWISE     = -1;
-  /**
-   * A value that indicates an orientation of counterclockwise, or a left turn.
-   */
-  public static final int COUNTERCLOCKWISE  = 1;
-  /**
-   * A value that indicates an orientation of collinear, or no turn (straight).
-   */
-  public static final int COLLINEAR         = 0;
-
-  /**
-   * Returns the index of the direction of the point <code>q</code>
-   * relative to a
-   * vector specified by <code>p1-p2</code>.
-   *
-   * @param p1 the origin point of the vector
-   * @param p2 the final point of the vector
-   * @param q the point to compute the direction to
-   *
-   * @return 1 if q is counter-clockwise (left) from p1-p2
-   * @return -1 if q is clockwise (right) from p1-p2
-   * @return 0 if q is collinear with p1-p2
-   */
-  public static int orientationIndex(Coordinate p1, Coordinate p2, Coordinate q) 
-  {
-  	/**
-  	 * MD - 9 Aug 2010
-  	 * It seems that the basic algorithm is slightly orientation dependent,
-  	 * when computing the orientation of a point very close to a line.
-  	 * This is possibly due to the arithmetic in the translation to the origin.
-  	 * 
-  	 * For instance, the following situation produces identical results 
-  	 * in spite of the inverse orientation of the line segment:
-  	 * 
-  	 * Coordinate p0 = new Coordinate(219.3649559090992, 140.84159161824724);
-  	 * Coordinate p1 = new Coordinate(168.9018919682399, -5.713787599646864);
-  	 * 
-  	 * Coordinate p = new Coordinate(186.80814046338352, 46.28973405831556);
-  	 * int orient = orientationIndex(p0, p1, p);
-  	 * int orientInv = orientationIndex(p1, p0, p);
-
-  	 * A way to force consistent results is to normalize the orientation of the vector
-  	 * using the following code.
-  	 * However, this may make the results of orientationIndex inconsistent
-  	 * through the triangle of points, so it's not clear this is 
-  	 * an appropriate patch.
-  	 * 
-  	 */
-  	/*
-  	 // Normalize orientation of vector to provide consistent results
-    // This produces repeatable results for single cases, but does not fully solve robustness issues
- 	   if (p2.x < p1.x || (p2.x == p1.x && p2.y < p1.y))
-			return -orientationIndex(p2, p1, q);
-	  //*/
-    double dx1 = p2.x - p1.x;
-    double dy1 = p2.y - p1.y;
-    double dx2 = q.x - p2.x;
-    double dy2 = q.y - p2.y;
-    return RobustDeterminant.signOfDet2x2(dx1, dy1, dx2, dy2);
-  }
-
-  public CGAlgorithms() {
-  }
-
-  /**
-   * Tests whether a point lies inside or on a ring.
-   * The ring may be oriented in either direction.
-   * A point lying exactly on the ring boundary is considered to be inside the ring.
-   * <p>
-   * This method does <i>not</i> first check the point against the envelope
-   * of the ring.
-   *
-   * @param p point to check for ring inclusion
-   * @param ring an array of coordinates representing the ring (which must have first point identical to last point)
-   * @return true if p is inside ring
-   * 
-   * @see locatePointInRing
-   */
-  public static boolean isPointInRing(Coordinate p, Coordinate[] ring) {
-  	return locatePointInRing(p, ring) != Location.EXTERIOR;
-  }
-  
-
-  /**
-   * Determines whether a point lies in the interior, on the boundary, or in the exterior
-   * of a ring.
-   * The ring may be oriented in either direction.
-   * <p>
-   * This method does <i>not</i> first check the point against the envelope
-   * of the ring.
-   *
-   * @param p point to check for ring inclusion
-   * @param ring an array of coordinates representing the ring (which must have first point identical to last point)
-   * @return the {@link Location} of p relative to the ring
-   */
-  public static int locatePointInRing(Coordinate p, Coordinate[] ring) 
-  {
-    return RayCrossingCounter.locatePointInRing(p, ring);
-  }
-  
-  /**
-   * Tests whether a point lies on the line segments defined by a
-   * list of coordinates.
-   *
-   * @return true if the point is a vertex of the line 
-   * or lies in the interior of a line segment in the linestring
-   */
-  public static boolean isOnLine(Coordinate p, Coordinate[] pt) {
-    LineIntersector lineIntersector = new RobustLineIntersector();
-    for (int i = 1; i < pt.length; i++) {
-      Coordinate p0 = pt[i - 1];
-      Coordinate p1 = pt[i];
-      lineIntersector.computeIntersection(p, p0, p1);
-      if (lineIntersector.hasIntersection()) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  /**
-   * Computes whether a ring defined by an array of {@link Coordinate}s is
-   * oriented counter-clockwise.
-   * <ul>
-   * <li>The list of points is assumed to have the first and last points equal.
-   * <li>This will handle coordinate lists which contain repeated points.
-   * </ul>
-   * This algorithm is <b>only</b> guaranteed to work with valid rings.
-   * If the ring is invalid (e.g. self-crosses or touches),
-   * the computed result may not be correct.
-   *
-   * @param ring an array of Coordinates forming a ring
-   * @return true if the ring is oriented counter-clockwise.
-   * @throws IllegalArgumentException if there are too few points to determine orientation (< 3)
-   */
-  public static boolean isCCW(Coordinate[] ring) {
-    // # of points without closing endpoint
-    int nPts = ring.length - 1;
-    // sanity check
-    if (nPts < 3)
-    	throw new IllegalArgumentException("Ring has fewer than 3 points, so orientation cannot be determined");
-    
-    // find highest point
-    Coordinate hiPt = ring[0];
-    int hiIndex = 0;
-    for (int i = 1; i <= nPts; i++) {
-      Coordinate p = ring[i];
-      if (p.y > hiPt.y) {
-        hiPt = p;
-        hiIndex = i;
-      }
-    }
-
-    // find distinct point before highest point
-    int iPrev = hiIndex;
-    do {
-      iPrev = iPrev - 1;
-      if (iPrev < 0) iPrev = nPts;
-    } while (ring[iPrev].equals2D(hiPt) && iPrev != hiIndex);
-
-    // find distinct point after highest point
-    int iNext = hiIndex;
-    do {
-      iNext = (iNext + 1) % nPts;
-    } while (ring[iNext].equals2D(hiPt) && iNext != hiIndex);
-
-    Coordinate prev = ring[iPrev];
-    Coordinate next = ring[iNext];
-
-    /**
-     * This check catches cases where the ring contains an A-B-A configuration of points.
-     * This can happen if the ring does not contain 3 distinct points
-     * (including the case where the input array has fewer than 4 elements),
-     * or it contains coincident line segments.
-     */
-    if (prev.equals2D(hiPt) || next.equals2D(hiPt) || prev.equals2D(next))
-      return false;
-
-    int disc = computeOrientation(prev, hiPt, next);
-
-    /**
-     *  If disc is exactly 0, lines are collinear.  There are two possible cases:
-     *  (1) the lines lie along the x axis in opposite directions
-     *  (2) the lines lie on top of one another
-     *
-     *  (1) is handled by checking if next is left of prev ==> CCW
-     *  (2) will never happen if the ring is valid, so don't check for it
-     *  (Might want to assert this)
-     */
-    boolean isCCW = false;
-    if (disc == 0) {
-      // poly is CCW if prev x is right of next x
-      isCCW = (prev.x > next.x);
-    }
-    else {
-      // if area is positive, points are ordered CCW
-      isCCW = (disc > 0);
-    }
-    return isCCW;
-  }
-
-  /**
-   * Computes the orientation of a point q to the directed line segment p1-p2.
-   * The orientation of a point relative to a directed line segment indicates
-   * which way you turn to get to q after travelling from p1 to p2.
-   *
-   * @return 1 if q is counter-clockwise from p1-p2
-   * @return -1 if q is clockwise from p1-p2
-   * @return 0 if q is collinear with p1-p2
-   */
-  public static int computeOrientation(Coordinate p1, Coordinate p2, Coordinate q) {
-    return orientationIndex(p1, p2, q);
-  }
-
-
-  /**
-   * Computes the distance from a point p to a line segment AB
-   *
-   * Note: NON-ROBUST!
-   *
-   * @param p the point to compute the distance for
-   * @param A one point of the line
-   * @param B another point of the line (must be different to A)
-   * @return the distance from p to line segment AB
-   */
-  public static double distancePointLine(Coordinate p, Coordinate A, Coordinate B)
-  {
-    // if start = end, then just compute distance to one of the endpoints
-    if (  A.x == B.x && A.y == B.y ) return p.distance(A);
-
-    // otherwise use comp.graphics.algorithms Frequently Asked Questions method
-    /*(1)     	      AC dot AB
-                   r = ---------
-                         ||AB||^2
-		r has the following meaning:
-		r=0 P = A
-		r=1 P = B
-		r<0 P is on the backward extension of AB
-		r>1 P is on the forward extension of AB
-		0<r<1 P is interior to AB
-	*/
-
-    double r = ( (p.x - A.x) * (B.x - A.x) + (p.y - A.y) * (B.y - A.y) )
-              /
-            ( (B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y) );
-
-    if (r <= 0.0) return p.distance(A);
-    if (r >= 1.0) return p.distance(B);
-
-
-    /*(2)
-		     (Ay-Cy)(Bx-Ax)-(Ax-Cx)(By-Ay)
-		s = -----------------------------
-		             	L^2
-
-		Then the distance from C to P = |s|*L.
-	*/
-
-    double s = ((A.y - p.y) *(B.x - A.x) - (A.x - p.x)*(B.y - A.y) )
-              /
-            ((B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y) );
-
-    return
-      Math.abs(s) *
-      Math.sqrt(((B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y)));
-  }
-  
-	
-  /**
-   * Computes the distance from a line segment AB to a line segment CD
-   *
-   * Note: NON-ROBUST!
-   *
-   * @param A a point of one line
-   * @param B the second point of  (must be different to A)
-   * @param C one point of the line
-   * @param D another point of the line (must be different to A)
-   */
-  public static double distanceLineLine(Coordinate A, Coordinate B, Coordinate C, Coordinate D)
-  {
-    // check for zero-length segments
-    if (  A.equals(B) )	return distancePointLine(A,C,D);
-    if (  C.equals(D) )	return distancePointLine(D,A,B);
-
-    // AB and CD are line segments
-    /* from comp.graphics.algo
-
-	Solving the above for r and s yields
-				(Ay-Cy)(Dx-Cx)-(Ax-Cx)(Dy-Cy)
-	           r = ----------------------------- (eqn 1)
-				(Bx-Ax)(Dy-Cy)-(By-Ay)(Dx-Cx)
-
-		 	(Ay-Cy)(Bx-Ax)-(Ax-Cx)(By-Ay)
-		s = ----------------------------- (eqn 2)
-			(Bx-Ax)(Dy-Cy)-(By-Ay)(Dx-Cx)
-	Let P be the position vector of the intersection point, then
-		P=A+r(B-A) or
-		Px=Ax+r(Bx-Ax)
-		Py=Ay+r(By-Ay)
-	By examining the values of r & s, you can also determine some other
-limiting conditions:
-		If 0<=r<=1 & 0<=s<=1, intersection exists
-		r<0 or r>1 or s<0 or s>1 line segments do not intersect
-		If the denominator in eqn 1 is zero, AB & CD are parallel
-		If the numerator in eqn 1 is also zero, AB & CD are collinear.
-
-	*/
-    double r_top = (A.y-C.y)*(D.x-C.x) - (A.x-C.x)*(D.y-C.y) ;
-    double r_bot = (B.x-A.x)*(D.y-C.y) - (B.y-A.y)*(D.x-C.x) ;
-
-    double s_top = (A.y-C.y)*(B.x-A.x) - (A.x-C.x)*(B.y-A.y);
-    double s_bot = (B.x-A.x)*(D.y-C.y) - (B.y-A.y)*(D.x-C.x);
-
-    if  ( (r_bot==0) || (s_bot == 0) ) {
-      return
-        Math.min(distancePointLine(A,C,D),
-	  Math.min(distancePointLine(B,C,D),
-	    Math.min(distancePointLine(C,A,B),
-	      distancePointLine(D,A,B)    ) ) );
-
-    }
-    double s = s_top/s_bot;
-    double r=  r_top/r_bot;
-
-    if ((r < 0) || ( r > 1) || (s < 0) || (s > 1) )	{
-      //no intersection
-      return
-        Math.min(distancePointLine(A,C,D),
-	  Math.min(distancePointLine(B,C,D),
-	    Math.min(distancePointLine(C,A,B),
-	      distancePointLine(D,A,B)    ) ) );
-    }
-    return 0.0; //intersection exists
-  }
-
-  /**
-   * Computes the signed area for a ring.      
-   * The signed area is:
-   * <ul>
-   * <li>positive if the ring is oriented CW
-   * <li>negative if the ring is oriented CCW
-   * <li>zero if the ring is degenerate or flat
-   * </ul> 
-   * 
-   * @param ring the coordinates forming the ring
-   * @return the signed area of the ring
-   */
-  public static double signedArea(CoordinateSequence ring)
-  {
-    int n = ring.size();
-    if (n < 3) return 0.0;
-    double sum = 0.0;
-    Coordinate p = new Coordinate();
-    ring.getCoordinate(0, p);
-    double bx = p.x;
-    double by = p.y;
-    for (int i = 1; i < n; i++) {
-      ring.getCoordinate(i, p);
-      double cx = p.x;
-      double cy = p.y;
-      sum += (bx + cx) * (cy - by);
-      bx = cx;
-      by = cy;
-    }
-    return -sum  / 2.0;
-  } 
-  
-  /**
-   * Computes the length of a linestring specified by a sequence of points.
-   *
-   * @param pts the points specifying the linestring
-   * @return the length of the linestring
-   */
-  public static double length(CoordinateSequence pts) 
-  {
-    // optimized for processing CoordinateSequences
-    int n = pts.size();
-    if (n <= 1) return 0.0;
-    
-    double len = 0.0;
-    
-    Coordinate p = new Coordinate();
-    pts.getCoordinate(0, p);
-    double x0 = p.x;
-    double y0 = p.y;
-    
-    for (int i = 1; i < n; i++) {
-      pts.getCoordinate(i, p);
-      double x1 = p.x;
-      double y1 = p.y;
-      double dx = x1 - x0;
-      double dy = y1 - y0;
-
-      len += Math.sqrt(dx * dx + dy * dy);
-      
-      x0 = x1;
-      y0 = y1;
-    }
-    return len;
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/CentralEndpointIntersector.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/CentralEndpointIntersector.java	(revision 28245)
+++ 	(revision )
@@ -1,125 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-
-import com.vividsolutions.jts.geom.Coordinate;
-
-
-/**
- * Computes an approximate intersection of two line segments
- * by taking the most central of the endpoints of the segments.
- * This is effective in cases where the segments are nearly parallel
- * and should intersect at an endpoint.
- * It is also a reasonable strategy for cases where the 
- * endpoint of one segment lies on or almost on the interior of another one.
- * Taking the most central endpoint ensures that the computed intersection
- * point lies in the envelope of the segments.
- * Also, by always returning one of the input points, this should result 
- * in reducing segment fragmentation.
- * Intended to be used as a last resort for 
- * computing ill-conditioned intersection situations which 
- * cause other methods to fail.
- *
- * @author Martin Davis
- * @version 1.8
- */
-public class CentralEndpointIntersector 
-{
-	public static Coordinate getIntersection(Coordinate p00, Coordinate p01,
-			Coordinate p10, Coordinate p11)
-	{
-		CentralEndpointIntersector intor = new CentralEndpointIntersector(p00, p01, p10, p11);
-		return intor.getIntersection();
-	}
-	
-	private Coordinate[] pts;
-	private Coordinate intPt = null;
-
-	public CentralEndpointIntersector(Coordinate p00, Coordinate p01,
-			Coordinate p10, Coordinate p11) 
-	{
-		pts = new Coordinate[] { p00, p01, p10, p11 };
-		compute();
-	}
-
-	private void compute() 
-	{
-		Coordinate centroid = average(pts);
-		intPt = findNearestPoint(centroid, pts);
-	}
-
-	public Coordinate getIntersection() {
-		return intPt;
-	}
-
-	private static Coordinate average(Coordinate[] pts)
-	{
-		Coordinate avg = new Coordinate();
-		int n = pts.length;
-		for (int i = 0; i < pts.length; i++) {
-			avg.x += pts[i].x;
-			avg.y += pts[i].y;
-		}
-		if (n > 0) {
-			avg.x /= n;
-			avg.y /= n;
-		}
-		return avg;
-	}
-	
-  /**
-   * Determines a point closest to the given point.
-   * 
-   * @param p the point to compare against
-   * @param p1 a potential result point
-   * @param p2 a potential result point
-   * @param q1 a potential result point
-   * @param q2 a potential result point
-   * @return the point closest to the input point p
-   */
-  private Coordinate findNearestPoint(Coordinate p, Coordinate[] pts)
-  {
-  	double minDist = Double.MAX_VALUE;
-  	Coordinate result = null;
-  	for (int i = 0; i < pts.length; i++) {
-  		double dist = p.distance(pts[i]);
-  		if (dist < minDist) {
-  			minDist = dist;
-  			result = pts[i];
-  		}
-  	}
-  	return result;
-  }
-  
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/ConvexHull.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/ConvexHull.java	(revision 28245)
+++ 	(revision )
@@ -1,525 +1,0 @@
-
-
-/*
-* The JTS Topology Suite is a collection of Java classes that
-* implement the fundamental operations required to validate a given
-* geo-spatial data set to a known topological specification.
-*
-* Copyright (C) 2001 Vivid Solutions
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2.1 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*
-* For more information, contact:
-*
-*     Vivid Solutions
-*     Suite #1A
-*     2328 Government Street
-*     Victoria BC  V8T 5G5
-*     Canada
-*
-*     (250)385-6040
-*     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Stack;
-import java.util.TreeSet;
-
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.CoordinateArrays;
-import com.vividsolutions.jts.geom.CoordinateList;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.GeometryCollection;
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geom.LineString;
-import com.vividsolutions.jts.geom.LinearRing;
-import com.vividsolutions.jts.geom.Point;
-import com.vividsolutions.jts.geom.Polygon;
-import com.vividsolutions.jts.util.Assert;
-import com.vividsolutions.jts.util.UniqueCoordinateArrayFilter;
-
-/**
- * Computes the convex hull of a {@link Geometry}.
- * The convex hull is the smallest convex Geometry that contains all the
- * points in the input Geometry.
- * <p>
- * Uses the Graham Scan algorithm.
- *
- *@version 1.7
- */
-public class ConvexHull
-{
-  private GeometryFactory geomFactory;
-  private Coordinate[] inputPts;
-
-  /**
-   * Create a new convex hull construction for the input {@link Geometry}.
-   */
-  public ConvexHull(Geometry geometry)
-  {
-    this(extractCoordinates(geometry), geometry.getFactory());
-  }
-  /**
-   * Create a new convex hull construction for the input {@link Coordinate} array.
-   */
-  public ConvexHull(Coordinate[] pts, GeometryFactory geomFactory)
-  {
-    inputPts = pts;
-    this.geomFactory = geomFactory;
-  }
-
-  private static Coordinate[] extractCoordinates(Geometry geom)
-  {
-    UniqueCoordinateArrayFilter filter = new UniqueCoordinateArrayFilter();
-    geom.apply(filter);
-    return filter.getCoordinates();
-  }
-
-  /**
-   * Returns a {@link Geometry} that represents the convex hull of the input
-   * geometry.
-   * The returned geometry contains the minimal number of points needed to
-   * represent the convex hull.  In particular, no more than two consecutive
-   * points will be collinear.
-   *
-   * @return if the convex hull contains 3 or more points, a {@link Polygon};
-   * 2 points, a {@link LineString};
-   * 1 point, a {@link Point};
-   * 0 points, an empty {@link GeometryCollection}.
-   */
-  public Geometry getConvexHull() {
-
-    if (inputPts.length == 0) {
-      return geomFactory.createGeometryCollection(null);
-    }
-    if (inputPts.length == 1) {
-      return geomFactory.createPoint(inputPts[0]);
-    }
-    if (inputPts.length == 2) {
-      return geomFactory.createLineString(inputPts);
-    }
-
-    Coordinate[] reducedPts = inputPts;
-    // use heuristic to reduce points, if large
-    if (inputPts.length > 50) {
-      reducedPts = reduce(inputPts);
-    }
-    // sort points for Graham scan.
-    Coordinate[] sortedPts = preSort(reducedPts);
-
-    // Use Graham scan to find convex hull.
-    Stack cHS = grahamScan(sortedPts);
-
-    // Convert stack to an array.
-    Coordinate[] cH = toCoordinateArray(cHS);
-
-    // Convert array to appropriate output geometry.
-    return lineOrPolygon(cH);
-  }
-
-  /**
-   * An alternative to Stack.toArray, which is not present in earlier versions
-   * of Java.
-   */
-  protected Coordinate[] toCoordinateArray(Stack stack) {
-    Coordinate[] coordinates = new Coordinate[stack.size()];
-    for (int i = 0; i < stack.size(); i++) {
-      Coordinate coordinate = (Coordinate) stack.get(i);
-      coordinates[i] = coordinate;
-    }
-    return coordinates;
-  }
-
-  /**
-   * Uses a heuristic to reduce the number of points scanned
-   * to compute the hull.
-   * The heuristic is to find a polygon guaranteed to
-   * be in (or on) the hull, and eliminate all points inside it.
-   * A quadrilateral defined by the extremal points
-   * in the four orthogonal directions
-   * can be used, but even more inclusive is
-   * to use an octilateral defined by the points in the 8 cardinal directions.
-   * <p>
-   * Note that even if the method used to determine the polygon vertices
-   * is not 100% robust, this does not affect the robustness of the convex hull.
-   * <p>
-   * To satisfy the requirements of the Graham Scan algorithm, 
-   * the returned array has at least 3 entries.
-   *
-   * @param pts the points to reduce
-   * @return the reduced list of points (at least 3)
-   */
-  private Coordinate[] reduce(Coordinate[] inputPts)
-  {
-    //Coordinate[] polyPts = computeQuad(inputPts);
-    Coordinate[] polyPts = computeOctRing(inputPts);
-    //Coordinate[] polyPts = null;
-
-    // unable to compute interior polygon for some reason
-    if (polyPts == null)
-      return inputPts;
-
-//    LinearRing ring = geomFactory.createLinearRing(polyPts);
-//    System.out.println(ring);
-
-    // add points defining polygon
-    TreeSet reducedSet = new TreeSet();
-    for (int i = 0; i < polyPts.length; i++) {
-      reducedSet.add(polyPts[i]);
-    }
-    /**
-     * Add all unique points not in the interior poly.
-     * CGAlgorithms.isPointInRing is not defined for points actually on the ring,
-     * but this doesn't matter since the points of the interior polygon
-     * are forced to be in the reduced set.
-     */
-    for (int i = 0; i < inputPts.length; i++) {
-      if (! CGAlgorithms.isPointInRing(inputPts[i], polyPts)) {
-        reducedSet.add(inputPts[i]);
-      }
-    }
-    Coordinate[] reducedPts = CoordinateArrays.toCoordinateArray(reducedSet);
-    
-    // ensure that computed array has at least 3 points (not necessarily unique)  
-    if (reducedPts.length < 3)
-      return padArray3(reducedPts); 
-    return reducedPts;
-  }
-
-  private Coordinate[] padArray3(Coordinate[] pts)
-  {
-    Coordinate[] pad = new Coordinate[3];
-    for (int i = 0; i < pad.length; i++) {
-      if (i < pts.length) {
-        pad[i] = pts[i];
-      }
-      else
-        pad[i] = pts[0];
-    }
-    return pad;
-  }
-    
-  private Coordinate[] preSort(Coordinate[] pts) {
-    Coordinate t;
-
-    // find the lowest point in the set. If two or more points have
-    // the same minimum y coordinate choose the one with the minimu x.
-    // This focal point is put in array location pts[0].
-    for (int i = 1; i < pts.length; i++) {
-      if ((pts[i].y < pts[0].y) || ((pts[i].y == pts[0].y) && (pts[i].x < pts[0].x))) {
-        t = pts[0];
-        pts[0] = pts[i];
-        pts[i] = t;
-      }
-    }
-
-    // sort the points radially around the focal point.
-    Arrays.sort(pts, 1, pts.length, new RadialComparator(pts[0]));
-
-    //radialSort(pts);
-    return pts;
-  }
-
-  /**
-   * Uses the Graham Scan algorithm to compute the convex hull vertices.
-   * 
-   * @param c a list of points, with at least 3 entries
-   * @return a Stack containing the ordered points of the convex hull ring
-   */
-  private Stack grahamScan(Coordinate[] c) {
-    Coordinate p;
-    Stack ps = new Stack();
-    p = (Coordinate) ps.push(c[0]);
-    p = (Coordinate) ps.push(c[1]);
-    p = (Coordinate) ps.push(c[2]);
-    for (int i = 3; i < c.length; i++) {
-      p = (Coordinate) ps.pop();
-      while (CGAlgorithms.computeOrientation((Coordinate) ps.peek(), p, c[i]) > 0) {
-        p = (Coordinate) ps.pop();
-      }
-      p = (Coordinate) ps.push(p);
-      p = (Coordinate) ps.push(c[i]);
-    }
-    p = (Coordinate) ps.push(c[0]);
-    return ps;
-  }
-
-  /**
-   *@return    whether the three coordinates are collinear and c2 lies between
-   *      c1 and c3 inclusive
-   */
-  private boolean isBetween(Coordinate c1, Coordinate c2, Coordinate c3) {
-    if (CGAlgorithms.computeOrientation(c1, c2, c3) != 0) {
-      return false;
-    }
-    if (c1.x != c3.x) {
-      if (c1.x <= c2.x && c2.x <= c3.x) {
-        return true;
-      }
-      if (c3.x <= c2.x && c2.x <= c1.x) {
-        return true;
-      }
-    }
-    if (c1.y != c3.y) {
-      if (c1.y <= c2.y && c2.y <= c3.y) {
-        return true;
-      }
-      if (c3.y <= c2.y && c2.y <= c1.y) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  private Coordinate[] computeOctRing(Coordinate[] inputPts) {
-    Coordinate[] octPts = computeOctPts(inputPts);
-    CoordinateList coordList = new CoordinateList();
-    coordList.add(octPts, false);
-
-    // points must all lie in a line
-    if (coordList.size() < 3) {
-      return null;
-    }
-    coordList.closeRing();
-    return coordList.toCoordinateArray();
-  }
-
-  private Coordinate[] computeOctPts(Coordinate[] inputPts)
-  {
-    Coordinate[] pts = new Coordinate[8];
-    for (int j = 0; j < pts.length; j++) {
-      pts[j] = inputPts[0];
-    }
-    for (int i = 1; i < inputPts.length; i++) {
-      if (inputPts[i].x < pts[0].x) {
-        pts[0] = inputPts[i];
-      }
-      if (inputPts[i].x - inputPts[i].y < pts[1].x - pts[1].y) {
-        pts[1] = inputPts[i];
-      }
-      if (inputPts[i].y > pts[2].y) {
-        pts[2] = inputPts[i];
-      }
-      if (inputPts[i].x + inputPts[i].y > pts[3].x + pts[3].y) {
-        pts[3] = inputPts[i];
-      }
-      if (inputPts[i].x > pts[4].x) {
-        pts[4] = inputPts[i];
-      }
-      if (inputPts[i].x - inputPts[i].y > pts[5].x - pts[5].y) {
-        pts[5] = inputPts[i];
-      }
-      if (inputPts[i].y < pts[6].y) {
-        pts[6] = inputPts[i];
-      }
-      if (inputPts[i].x + inputPts[i].y < pts[7].x + pts[7].y) {
-        pts[7] = inputPts[i];
-      }
-    }
-    return pts;
-
-  }
-
-/*
-  // MD - no longer used, but keep for reference purposes
-  private Coordinate[] computeQuad(Coordinate[] inputPts) {
-    BigQuad bigQuad = bigQuad(inputPts);
-
-    // Build a linear ring defining a big poly.
-    ArrayList bigPoly = new ArrayList();
-    bigPoly.add(bigQuad.westmost);
-    if (! bigPoly.contains(bigQuad.northmost)) {
-      bigPoly.add(bigQuad.northmost);
-    }
-    if (! bigPoly.contains(bigQuad.eastmost)) {
-      bigPoly.add(bigQuad.eastmost);
-    }
-    if (! bigPoly.contains(bigQuad.southmost)) {
-      bigPoly.add(bigQuad.southmost);
-    }
-    // points must all lie in a line
-    if (bigPoly.size() < 3) {
-      return null;
-    }
-    // closing point
-    bigPoly.add(bigQuad.westmost);
-
-    Coordinate[] bigPolyArray = CoordinateArrays.toCoordinateArray(bigPoly);
-
-    return bigPolyArray;
-  }
-
-  private BigQuad bigQuad(Coordinate[] pts) {
-    BigQuad bigQuad = new BigQuad();
-    bigQuad.northmost = pts[0];
-    bigQuad.southmost = pts[0];
-    bigQuad.westmost = pts[0];
-    bigQuad.eastmost = pts[0];
-    for (int i = 1; i < pts.length; i++) {
-      if (pts[i].x < bigQuad.westmost.x) {
-        bigQuad.westmost = pts[i];
-      }
-      if (pts[i].x > bigQuad.eastmost.x) {
-        bigQuad.eastmost = pts[i];
-      }
-      if (pts[i].y < bigQuad.southmost.y) {
-        bigQuad.southmost = pts[i];
-      }
-      if (pts[i].y > bigQuad.northmost.y) {
-        bigQuad.northmost = pts[i];
-      }
-    }
-    return bigQuad;
-  }
-
-  private static class BigQuad {
-    public Coordinate northmost;
-    public Coordinate southmost;
-    public Coordinate westmost;
-    public Coordinate eastmost;
-  }
-  */
-
-  /**
-   *@param  vertices  the vertices of a linear ring, which may or may not be
-   *      flattened (i.e. vertices collinear)
-   *@return           a 2-vertex <code>LineString</code> if the vertices are
-   *      collinear; otherwise, a <code>Polygon</code> with unnecessary
-   *      (collinear) vertices removed
-   */
-  private Geometry lineOrPolygon(Coordinate[] coordinates) {
-
-    coordinates = cleanRing(coordinates);
-    if (coordinates.length == 3) {
-      return geomFactory.createLineString(new Coordinate[]{coordinates[0], coordinates[1]});
-//      return new LineString(new Coordinate[]{coordinates[0], coordinates[1]},
-//          geometry.getPrecisionModel(), geometry.getSRID());
-    }
-    LinearRing linearRing = geomFactory.createLinearRing(coordinates);
-    return geomFactory.createPolygon(linearRing, null);
-  }
-
-  /**
-   *@param  vertices  the vertices of a linear ring, which may or may not be
-   *      flattened (i.e. vertices collinear)
-   *@return           the coordinates with unnecessary (collinear) vertices
-   *      removed
-   */
-  private Coordinate[] cleanRing(Coordinate[] original) {
-    Assert.equals(original[0], original[original.length - 1]);
-    ArrayList cleanedRing = new ArrayList();
-    Coordinate previousDistinctCoordinate = null;
-    for (int i = 0; i <= original.length - 2; i++) {
-      Coordinate currentCoordinate = original[i];
-      Coordinate nextCoordinate = original[i+1];
-      if (currentCoordinate.equals(nextCoordinate)) {
-        continue;
-      }
-      if (previousDistinctCoordinate != null
-          && isBetween(previousDistinctCoordinate, currentCoordinate, nextCoordinate)) {
-        continue;
-      }
-      cleanedRing.add(currentCoordinate);
-      previousDistinctCoordinate = currentCoordinate;
-    }
-    cleanedRing.add(original[original.length - 1]);
-    Coordinate[] cleanedRingCoordinates = new Coordinate[cleanedRing.size()];
-    return (Coordinate[]) cleanedRing.toArray(cleanedRingCoordinates);
-  }
-
-
-  /**
-   * Compares {@link Coordinate}s for their angle and distance
-   * relative to an origin.
-   *
-   * @author Martin Davis
-   * @version 1.7
-   */
-  private static class RadialComparator
-      implements Comparator
-  {
-    private Coordinate origin;
-
-    public RadialComparator(Coordinate origin)
-    {
-      this.origin = origin;
-    }
-    public int compare(Object o1, Object o2)
-    {
-      Coordinate p1 = (Coordinate) o1;
-      Coordinate p2 = (Coordinate) o2;
-      return polarCompare(origin, p1, p2);
-    }
-
-    /**
-     * Given two points p and q compare them with respect to their radial
-     * ordering about point o.  First checks radial ordering.
-     * If points are collinear, the comparison is based
-     * on their distance to the origin.
-     * <p>
-     * p < q iff
-     * <ul>
-     * <li>ang(o-p) < ang(o-q) (e.g. o-p-q is CCW)
-     * <li>or ang(o-p) == ang(o-q) && dist(o,p) < dist(o,q)
-     * </ul>
-     *
-     * @param o the origin
-     * @param p a point
-     * @param q another point
-     * @return -1, 0 or 1 depending on whether p is less than,
-     * equal to or greater than q
-     */
-    private static int polarCompare(Coordinate o, Coordinate p, Coordinate q)
-    {
-      double dxp = p.x - o.x;
-      double dyp = p.y - o.y;
-      double dxq = q.x - o.x;
-      double dyq = q.y - o.y;
-
-/*
-      // MD - non-robust
-      int result = 0;
-      double alph = Math.atan2(dxp, dyp);
-      double beta = Math.atan2(dxq, dyq);
-      if (alph < beta) {
-        result = -1;
-      }
-      if (alph > beta) {
-        result = 1;
-      }
-      if (result !=  0) return result;
-      //*/
-
-      int orient = CGAlgorithms.computeOrientation(o, p, q);
-
-      if (orient == CGAlgorithms.COUNTERCLOCKWISE) return 1;
-      if (orient == CGAlgorithms.CLOCKWISE) return -1;
-
-      // points are collinear - check distance
-      double op = dxp * dxp + dyp * dyp;
-      double oq = dxq * dxq + dyq * dyq;
-      if (op < oq) {
-        return -1;
-      }
-      if (op > oq) {
-        return 1;
-      }
-      return 0;
-    }
-
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/HCoordinate.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/HCoordinate.java	(revision 28245)
+++ 	(revision )
@@ -1,105 +1,0 @@
-/*
-* The JTS Topology Suite is a collection of Java classes that
-* implement the fundamental operations required to validate a given
-* geo-spatial data set to a known topological specification.
-*
-* Copyright (C) 2001 Vivid Solutions
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2.1 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*
-* For more information, contact:
-*
-*     Vivid Solutions
-*     Suite #1A
-*     2328 Government Street
-*     Victoria BC  V8T 5G5
-*     Canada
-*
-*     (250)385-6040
-*     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-
-import com.vividsolutions.jts.geom.Coordinate;
-
-/**
- * Represents a homogeneous coordinate in a 2-D coordinate space.
- * In JTS {@link HCoordinate}s are used as a clean way
- * of computing intersections between line segments.
- *
- * @author David Skea
- * @version 1.7
- */
-public class HCoordinate
-{
-
-  /**
-   * Computes the (approximate) intersection point between two line segments
-   * using homogeneous coordinates.
-   * <p>
-   * Note that this algorithm is
-   * not numerically stable; i.e. it can produce intersection points which
-   * lie outside the envelope of the line segments themselves.  In order
-   * to increase the precision of the calculation input points should be normalized
-   * before passing them to this routine.
-   */
-  public static Coordinate intersection(
-      Coordinate p1, Coordinate p2,
-      Coordinate q1, Coordinate q2)
-      throws NotRepresentableException
-  {
-  	// unrolled computation
-    double px = p1.y - p2.y;
-    double py = p2.x - p1.x;
-    double pw = p1.x * p2.y - p2.x * p1.y;
-    
-    double qx = q1.y - q2.y;
-    double qy = q2.x - q1.x;
-    double qw = q1.x * q2.y - q2.x * q1.y;
-    
-    double x = py * qw - qy * pw;
-    double y = qx * pw - px * qw;
-    double w = px * qy - qx * py;
-    
-    double xInt = x/w;
-    double yInt = y/w;
-    
-    if ((Double.isNaN(xInt)) || (Double.isInfinite(xInt)
-    		|| Double.isNaN(yInt)) || (Double.isInfinite(yInt))) {
-      throw new NotRepresentableException();
-    }
-    
-    return new Coordinate(xInt, yInt);
-  }
-
-  /*
-  public static Coordinate OLDintersection(
-      Coordinate p1, Coordinate p2,
-      Coordinate q1, Coordinate q2)
-      throws NotRepresentableException
-  {
-    HCoordinate l1 = new HCoordinate(p1, p2);
-    HCoordinate l2 = new HCoordinate(q1, q2);
-    HCoordinate intHCoord = new HCoordinate(l1, l2);
-    Coordinate intPt = intHCoord.getCoordinate();
-    return intPt;
-  }
-  */
-
-  public HCoordinate() {
-  }
-
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/LineIntersector.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/LineIntersector.java	(revision 28245)
+++ 	(revision )
@@ -1,326 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-
-/**
- * @version 1.7
- */
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.PrecisionModel;
-import com.vividsolutions.jts.io.WKTWriter;
-import com.vividsolutions.jts.util.Assert;
-
-/**
- * A LineIntersector is an algorithm that can both test whether
- * two line segments intersect and compute the intersection point
- * if they do.
- * The intersection point may be computed in a precise or non-precise manner.
- * Computing it precisely involves rounding it to an integer.  (This assumes
- * that the input coordinates have been made precise by scaling them to
- * an integer grid.)
- *
- * @version 1.7
- */
-public abstract class LineIntersector 
-{
-  
-  /**
-   * Indicates that line segments do not intersect
-   */
-  public final static int NO_INTERSECTION = 0;
-  
-  /**
-   * Indicates that line segments intersect in a single point
-   */
-  public final static int POINT_INTERSECTION = 1;
-  
-  /**
-   * Indicates that line segments intersect in a line segment
-   */
-  public final static int COLLINEAR_INTERSECTION = 2;
-
-  /**
-   * Computes the "edge distance" of an intersection point p along a segment.
-   * The edge distance is a metric of the point along the edge.
-   * The metric used is a robust and easy to compute metric function.
-   * It is <b>not</b> equivalent to the usual Euclidean metric.
-   * It relies on the fact that either the x or the y ordinates of the
-   * points in the edge are unique, depending on whether the edge is longer in
-   * the horizontal or vertical direction.
-   * <p>
-   * NOTE: This function may produce incorrect distances
-   *  for inputs where p is not precisely on p1-p2
-   * (E.g. p = (139,9) p1 = (139,10), p2 = (280,1) produces distanct 0.0, which is incorrect.
-   * <p>
-   * My hypothesis is that the function is safe to use for points which are the
-   * result of <b>rounding</b> points which lie on the line,
-   * but not safe to use for <b>truncated</b> points.
-   */
-  public static double computeEdgeDistance(
-        Coordinate p,
-        Coordinate p0,
-        Coordinate p1)
-  {
-    double dx = Math.abs(p1.x - p0.x);
-    double dy = Math.abs(p1.y - p0.y);
-
-    double dist = -1.0;   // sentinel value
-    if (p.equals(p0)) {
-      dist = 0.0;
-    }
-    else if (p.equals(p1)) {
-      if (dx > dy)
-        dist = dx;
-      else
-        dist = dy;
-    }
-    else {
-      double pdx = Math.abs(p.x - p0.x);
-      double pdy = Math.abs(p.y - p0.y);
-      if (dx > dy)
-        dist = pdx;
-      else
-        dist = pdy;
-      // <FIX>
-      // hack to ensure that non-endpoints always have a non-zero distance
-      if (dist == 0.0 && ! p.equals(p0))
-      {
-        dist = Math.max(pdx, pdy);
-      }
-    }
-    Assert.isTrue(! (dist == 0.0 && ! p.equals(p0)), "Bad distance calculation");
-    return dist;
-  }
-
-
-  protected int result;
-  protected Coordinate[][] inputLines = new Coordinate[2][2];
-  protected Coordinate[] intPt = new Coordinate[2];
-  /**
-   * The indexes of the endpoints of the intersection lines, in order along
-   * the corresponding line
-   */
-  protected boolean isProper;
-  /**
-   * If makePrecise is true, computed intersection coordinates will be made precise
-   * using Coordinate#makePrecise
-   */
-  protected PrecisionModel precisionModel = null;
-//public int numIntersects = 0;
-
-  public LineIntersector() {
-    intPt[0] = new Coordinate();
-    intPt[1] = new Coordinate();
-    // alias the intersection points for ease of reference
-    result = 0;
-  }
-
-  /**
-   * Force computed intersection to be rounded to a given precision model.
-   * No getter is provided, because the precision model is not required to be specified.
-   * @param precisionModel
-   */
-  public void setPrecisionModel(PrecisionModel precisionModel)
-  {
-    this.precisionModel = precisionModel;
-  }
-  
-  /**
-   * Compute the intersection of a point p and the line p1-p2.
-   * This function computes the boolean value of the hasIntersection test.
-   * The actual value of the intersection (if there is one)
-   * is equal to the value of <code>p</code>.
-   */
-  public abstract void computeIntersection(
-        Coordinate p,
-        Coordinate p1, Coordinate p2);
-
-  protected boolean isCollinear() {
-    return result == COLLINEAR_INTERSECTION;
-  }
-
-  /**
-   * Computes the intersection of the lines p1-p2 and p3-p4.
-   * This function computes both the boolean value of the hasIntersection test
-   * and the (approximate) value of the intersection point itself (if there is one).
-   */
-  public void computeIntersection(
-                Coordinate p1, Coordinate p2,
-                Coordinate p3, Coordinate p4) {
-    inputLines[0][0] = p1;
-    inputLines[0][1] = p2;
-    inputLines[1][0] = p3;
-    inputLines[1][1] = p4;
-    result = computeIntersect(p1, p2, p3, p4);
-//numIntersects++;
-  }
-
-  protected abstract int computeIntersect(
-                Coordinate p1, Coordinate p2,
-                Coordinate q1, Coordinate q2);
-
-/*
-  public String toString() {
-    String str = inputLines[0][0] + "-"
-         + inputLines[0][1] + " "
-         + inputLines[1][0] + "-"
-         + inputLines[1][1] + " : "
-               + getTopologySummary();
-    return str;
-  }
-*/
-
-  public String toString() {
-    return WKTWriter.toLineString(inputLines[0][0], inputLines[0][1]) + " - "
-    + WKTWriter.toLineString(inputLines[1][0], inputLines[1][1])
-                 + getTopologySummary();
-  }
-
-  private String getTopologySummary()
-  {
-    StringBuffer catBuf = new StringBuffer();
-    if (isEndPoint()) catBuf.append(" endpoint");
-    if (isProper) catBuf.append(" proper");
-    if (isCollinear()) catBuf.append(" collinear");
-    return catBuf.toString();
-  }
-
-  protected boolean isEndPoint() {
-    return hasIntersection() && !isProper;
-  }
-
-  /**
-   * Tests whether the input geometries intersect.
-   *
-   * @return true if the input geometries intersect
-   */
-  public boolean hasIntersection() {
-    return result != NO_INTERSECTION;
-  }
-
-  /**
-   * Returns the number of intersection points found.  This will be either 0, 1 or 2.
-   */
-  public int getIntersectionNum() { return result; }
-
-  /**
-   * Returns the intIndex'th intersection point
-   *
-   * @param intIndex is 0 or 1
-   *
-   * @return the intIndex'th intersection point
-   */
-  public Coordinate getIntersection(int intIndex)  { return intPt[intIndex]; }
-
-
-  /**
-   * Test whether a point is a intersection point of two line segments.
-   * Note that if the intersection is a line segment, this method only tests for
-   * equality with the endpoints of the intersection segment.
-   * It does <b>not</b> return true if
-   * the input point is internal to the intersection segment.
-   *
-   * @return true if the input point is one of the intersection points.
-   */
-  public boolean isIntersection(Coordinate pt) {
-    for (int i = 0; i < result; i++) {
-      if (intPt[i].equals2D(pt)) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  /**
-   * Tests whether either intersection point is an interior point of one of the input segments.
-   *
-   * @return <code>true</code> if either intersection point is in the interior of one of the input segments
-   */
-  public boolean isInteriorIntersection()
-  {
-    if (isInteriorIntersection(0)) return true;
-    if (isInteriorIntersection(1)) return true;
-    return false;
-  }
-
-  /**
-   * Tests whether either intersection point is an interior point of the specified input segment.
-   *
-   * @return <code>true</code> if either intersection point is in the interior of the input segment
-   */
-  public boolean isInteriorIntersection(int inputLineIndex)
-  {
-    for (int i = 0; i < result; i++) {
-      if (! (   intPt[i].equals2D(inputLines[inputLineIndex][0])
-             || intPt[i].equals2D(inputLines[inputLineIndex][1]) )) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  /**
-   * Tests whether an intersection is proper.
-   * <br>
-   * The intersection between two line segments is considered proper if
-   * they intersect in a single point in the interior of both segments
-   * (e.g. the intersection is a single point and is not equal to any of the
-   * endpoints).
-   * <p>
-   * The intersection between a point and a line segment is considered proper
-   * if the point lies in the interior of the segment (e.g. is not equal to
-   * either of the endpoints).
-   *
-   * @return true if the intersection is proper
-   */
-  public boolean isProper() {
-    return hasIntersection() && isProper;
-  }
-
-  /**
-   * Computes the "edge distance" of an intersection point along the specified input line segment.
-   *
-   * @param segmentIndex is 0 or 1
-   * @param intIndex is 0 or 1
-   *
-   * @return the edge distance of the intersection point
-   */
-  public double getEdgeDistance(int segmentIndex, int intIndex) {
-    double dist = computeEdgeDistance(intPt[intIndex], inputLines[segmentIndex][0],
-        inputLines[segmentIndex][1]);
-    return dist;
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/MCPointInRing.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/MCPointInRing.java	(revision 28245)
+++ 	(revision )
@@ -1,172 +1,0 @@
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-
-import java.util.Iterator;
-import java.util.List;
-
-import com.vividsolutions.jts.algorithm.locate.IndexedPointInAreaLocator;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.CoordinateArrays;
-import com.vividsolutions.jts.geom.Envelope;
-import com.vividsolutions.jts.geom.LineSegment;
-import com.vividsolutions.jts.geom.LinearRing;
-import com.vividsolutions.jts.index.bintree.Bintree;
-import com.vividsolutions.jts.index.bintree.Interval;
-import com.vividsolutions.jts.index.chain.MonotoneChain;
-import com.vividsolutions.jts.index.chain.MonotoneChainBuilder;
-import com.vividsolutions.jts.index.chain.MonotoneChainSelectAction;
-
-/**
- * Implements {@link PointInRing}
- * using {@link MonotoneChain}s and a {@link Bintree} index to
- * increase performance.
- *
- * @version 1.7
- * 
- * @see IndexedPointInAreaLocator for more general functionality
- */
-public class MCPointInRing   implements PointInRing {
-
-  class MCSelecter extends MonotoneChainSelectAction
-  {
-    Coordinate p;
-
-    public MCSelecter(Coordinate p)
-    {
-      this.p = p;
-    }
-
-    public void select(LineSegment ls)
-    {
-      testLineSegment(p, ls);
-    }
-  }
-
-  private LinearRing ring;
-  private Bintree tree;
-  private int crossings = 0;  // number of segment/ray crossings
-
-  public MCPointInRing(LinearRing ring)
-  {
-    this.ring = ring;
-    buildIndex();
-  }
-
-  private void buildIndex()
-  {
-    //Envelope env = ring.getEnvelopeInternal();
-    tree = new Bintree();
-
-    Coordinate[] pts = CoordinateArrays.removeRepeatedPoints(ring.getCoordinates());
-    List mcList = MonotoneChainBuilder.getChains(pts);
-
-    for (int i = 0; i < mcList.size(); i++) {
-      MonotoneChain mc = (MonotoneChain) mcList.get(i);
-      Envelope mcEnv = mc.getEnvelope();
-      interval.min = mcEnv.getMinY();
-      interval.max = mcEnv.getMaxY();
-      tree.insert(interval, mc);
-    }
-  }
-
-  private Interval interval = new Interval();
-
-  public boolean isInside(Coordinate pt)
-  {
-    crossings = 0;
-
-    // test all segments intersected by ray from pt in positive x direction
-    Envelope rayEnv = new Envelope(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, pt.y, pt.y);
-
-    interval.min = pt.y;
-    interval.max = pt.y;
-    List segs = tree.query(interval);
-//System.out.println("query size = " + segs.size());
-
-    MCSelecter mcSelecter = new MCSelecter(pt);
-    for (Iterator i = segs.iterator(); i.hasNext(); ) {
-      MonotoneChain mc = (MonotoneChain) i.next();
-      testMonotoneChain(rayEnv, mcSelecter, mc);
-    }
-
-    /*
-     *  p is inside if number of crossings is odd.
-     */
-    if ((crossings % 2) == 1) {
-      return true;
-    }
-    return false;
-  }
-
-
-  private void testMonotoneChain(Envelope rayEnv, MCSelecter mcSelecter, MonotoneChain mc)
-  {
-    mc.select(rayEnv, mcSelecter);
-  }
-
-  private void testLineSegment(Coordinate p, LineSegment seg) {
-    double xInt;  // x intersection of segment with ray
-    double x1;    // translated coordinates
-    double y1;
-    double x2;
-    double y2;
-
-    /*
-     *  Test if segment crosses ray from test point in positive x direction.
-     */
-    Coordinate p1 = seg.p0;
-    Coordinate p2 = seg.p1;
-    x1 = p1.x - p.x;
-    y1 = p1.y - p.y;
-    x2 = p2.x - p.x;
-    y2 = p2.y - p.y;
-
-    if (((y1 > 0) && (y2 <= 0)) ||
-        ((y2 > 0) && (y1 <= 0))) {
-        /*
-         *  segment straddles x axis, so compute intersection.
-         */
-      xInt = RobustDeterminant.signOfDet2x2(x1, y1, x2, y2) / (y2 - y1);
-        //xsave = xInt;
-        /*
-         *  crosses ray if strictly positive intersection.
-         */
-      if (0.0 < xInt) {
-        crossings++;
-      }
-    }
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/NotRepresentableException.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/NotRepresentableException.java	(revision 28245)
+++ 	(revision )
@@ -1,51 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-
-/**
- * Indicates that a {@link HCoordinate} has been computed which is
- * not representable on the Cartesian plane.
- *
- * @version 1.7
- * @see HCoordinate
- */
-public class NotRepresentableException extends Exception {
-
-  public NotRepresentableException() {
-    super("Projective point not representable on the Cartesian plane.");
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/PointInRing.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/PointInRing.java	(revision 28245)
+++ 	(revision )
@@ -1,50 +1,0 @@
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-
-import com.vividsolutions.jts.algorithm.locate.PointOnGeometryLocator;
-import com.vividsolutions.jts.geom.Coordinate;
-
-/**
- * An interface for classes which test whether a {@link Coordinate} lies inside
- * a ring.
- *
- * @version 1.7
- * 
- * @see PointOnGeometryLocator
- */
-public interface PointInRing {
-
-  boolean isInside(Coordinate pt);
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/PointLocator.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/PointLocator.java	(revision 28245)
+++ 	(revision )
@@ -1,218 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-
-import java.util.Iterator;
-
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.GeometryCollection;
-import com.vividsolutions.jts.geom.GeometryCollectionIterator;
-import com.vividsolutions.jts.geom.LineString;
-import com.vividsolutions.jts.geom.LinearRing;
-import com.vividsolutions.jts.geom.Location;
-import com.vividsolutions.jts.geom.MultiLineString;
-import com.vividsolutions.jts.geom.MultiPolygon;
-import com.vividsolutions.jts.geom.Point;
-import com.vividsolutions.jts.geom.Polygon;
-
-/**
- * Computes the topological ({@link Location})
- * of a single point to a {@link Geometry}.
- * A {@link BoundaryNodeRule} may be specified 
- * to control the evaluation of whether the point lies on the boundary or not
- * The default rule is to use the the <i>SFS Boundary Determination Rule</i>
- * <p>
- * Notes:
- * <ul>
- * <li>{@link LinearRing}s do not enclose any area - points inside the ring are still in the EXTERIOR of the ring.
- * </ul>
- * Instances of this class are not reentrant.
- *
- * @version 1.7
- */
-public class PointLocator
-{
-  // default is to use OGC SFS rule
-  private BoundaryNodeRule boundaryRule = 
-  	//BoundaryNodeRule.ENDPOINT_BOUNDARY_RULE; 
-  	BoundaryNodeRule.OGC_SFS_BOUNDARY_RULE;
-
-  private boolean isIn;         // true if the point lies in or on any Geometry element
-  private int numBoundaries;    // the number of sub-elements whose boundaries the point lies in
-
-  public PointLocator() {
-  }
-
-  /**
-   * Convenience method to test a point for intersection with
-   * a Geometry
-   * @param p the coordinate to test
-   * @param geom the Geometry to test
-   * @return <code>true</code> if the point is in the interior or boundary of the Geometry
-   */
-  public boolean intersects(Coordinate p, Geometry geom)
-  {
-    return locate(p, geom) != Location.EXTERIOR;
-  }
-
-  /**
-   * Computes the topological relationship ({@link Location}) of a single point
-   * to a Geometry.
-   * It handles both single-element
-   * and multi-element Geometries.
-   * The algorithm for multi-part Geometries
-   * takes into account the SFS Boundary Determination Rule.
-   *
-   * @return the {@link Location} of the point relative to the input Geometry
-   */
-  public int locate(Coordinate p, Geometry geom)
-  {
-    if (geom.isEmpty()) return Location.EXTERIOR;
-
-    if (geom instanceof LineString) {
-      return locate(p, (LineString) geom);
-    }
-    else if (geom instanceof Polygon) {
-      return locate(p, (Polygon) geom);
-    }
-
-    isIn = false;
-    numBoundaries = 0;
-    computeLocation(p, geom);
-    if (boundaryRule.isInBoundary(numBoundaries))
-      return Location.BOUNDARY;
-    if (numBoundaries > 0 || isIn)
-      return Location.INTERIOR;
-
-    return Location.EXTERIOR;
-  }
-
-  private void computeLocation(Coordinate p, Geometry geom)
-  {
-    if (geom instanceof Point) {
-      updateLocationInfo(locate(p, (Point) geom));
-    }
-    if (geom instanceof LineString) {
-      updateLocationInfo(locate(p, (LineString) geom));
-    }
-    else if (geom instanceof Polygon) {
-      updateLocationInfo(locate(p, (Polygon) geom));
-    }
-    else if (geom instanceof MultiLineString) {
-      MultiLineString ml = (MultiLineString) geom;
-      for (int i = 0; i < ml.getNumGeometries(); i++) {
-        LineString l = (LineString) ml.getGeometryN(i);
-        updateLocationInfo(locate(p, l));
-      }
-    }
-    else if (geom instanceof MultiPolygon) {
-      MultiPolygon mpoly = (MultiPolygon) geom;
-      for (int i = 0; i < mpoly.getNumGeometries(); i++) {
-        Polygon poly = (Polygon) mpoly.getGeometryN(i);
-        updateLocationInfo(locate(p, poly));
-      }
-    }
-    else if (geom instanceof GeometryCollection) {
-      Iterator geomi = new GeometryCollectionIterator(geom);
-      while (geomi.hasNext()) {
-        Geometry g2 = (Geometry) geomi.next();
-        if (g2 != geom)
-          computeLocation(p, g2);
-      }
-    }
-  }
-
-  private void updateLocationInfo(int loc)
-  {
-    if (loc == Location.INTERIOR) isIn = true;
-    if (loc == Location.BOUNDARY) numBoundaries++;
-  }
-
-  private int locate(Coordinate p, Point pt)
-  {
-  	// no point in doing envelope test, since equality test is just as fast
-  	
-    Coordinate ptCoord = pt.getCoordinate();
-    if (ptCoord.equals2D(p))
-      return Location.INTERIOR;
-    return Location.EXTERIOR;
-  }
-
-  private int locate(Coordinate p, LineString l)
-  {
-  	// bounding-box check
-  	if (! l.getEnvelopeInternal().intersects(p)) return Location.EXTERIOR;
-  	
-    Coordinate[] pt = l.getCoordinates();
-    if (! l.isClosed()) {
-      if (p.equals(pt[0])
-          || p.equals(pt[pt.length - 1]) ) {
-        return Location.BOUNDARY;
-      }
-    }
-    if (CGAlgorithms.isOnLine(p, pt))
-      return Location.INTERIOR;
-    return Location.EXTERIOR;
-  }
-
-  private int locateInPolygonRing(Coordinate p, LinearRing ring)
-  {
-  	// bounding-box check
-  	if (! ring.getEnvelopeInternal().intersects(p)) return Location.EXTERIOR;
-
-  	return CGAlgorithms.locatePointInRing(p, ring.getCoordinates());
-  }
-
-  private int locate(Coordinate p, Polygon poly)
-  {
-    if (poly.isEmpty()) return Location.EXTERIOR;
-
-    LinearRing shell = (LinearRing) poly.getExteriorRing();
-
-    int shellLoc = locateInPolygonRing(p, shell);
-    if (shellLoc == Location.EXTERIOR) return Location.EXTERIOR;
-    if (shellLoc == Location.BOUNDARY) return Location.BOUNDARY;
-    // now test if the point lies in or on the holes
-    for (int i = 0; i < poly.getNumInteriorRing(); i++) {
-      LinearRing hole = (LinearRing) poly.getInteriorRingN(i);
-      int holeLoc = locateInPolygonRing(p, hole);
-      if (holeLoc == Location.INTERIOR) return Location.EXTERIOR;
-      if (holeLoc == Location.BOUNDARY) return Location.BOUNDARY;
-    }
-    return Location.INTERIOR;
-  }
-
-
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/RayCrossingCounter.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/RayCrossingCounter.java	(revision 28245)
+++ 	(revision )
@@ -1,214 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Location;
-import com.vividsolutions.jts.geom.Polygonal;
-
-/**
- * Counts the number of segments crossed by a horizontal ray extending to the right
- * from a given point, in an incremental fashion.
- * This can be used to determine whether a point lies in a {@link Polygonal} geometry.
- * The class determines the situation where the point lies exactly on a segment.
- * When being used for Point-In-Polygon determination, this case allows short-circuiting
- * the evaluation.
- * <p>
- * This class handles polygonal geometries with any number of shells and holes.
- * The orientation of the shell and hole rings is unimportant.
- * In order to compute a correct location for a given polygonal geometry, 
- * it is essential that <b>all</b> segments are counted which
- * <ul>
- * <li>touch the ray 
- * <li>lie in in any ring which may contain the point
- * </ul>
- * The only exception is when the point-on-segment situation is detected, in which
- * case no further processing is required.
- * The implication of the above rule is that segments 
- * which can be a priori determined to <i>not</i> touch the ray
- * (i.e. by a test of their bounding box or Y-extent) 
- * do not need to be counted.  This allows for optimization by indexing.
- * 
- * @author Martin Davis
- *
- */
-public class RayCrossingCounter 
-{
-	/**
-	 * Determines the {@link Location} of a point in a ring.
-	 * This method is an exemplar of how to use this class.
-	 * 
-	 * @param p the point to test
-	 * @param ring an array of Coordinates forming a ring 
-	 * @return the location of the point in the ring
-	 */
-	public static int locatePointInRing(Coordinate p, Coordinate[] ring) 
-	{
-		RayCrossingCounter counter = new RayCrossingCounter(p);
-	
-    for (int i = 1; i < ring.length; i++) {
-      Coordinate p1 = ring[i];
-      Coordinate p2 = ring[i-1];
-      counter.countSegment(p1, p2);
-      if (counter.isOnSegment())
-      	return counter.getLocation();
-    }
-    return counter.getLocation();
-	}
-	
-	private Coordinate p;
-	private int crossingCount = 0;
-	// true if the test point lies on an input segment
-	private boolean isPointOnSegment = false;
-	
-	public RayCrossingCounter(Coordinate p)
-	{
-		this.p = p;
-	}
-	
-	/**
-	 * Counts a segment
-	 * 
-	 * @param p1 an endpoint of the segment
-	 * @param p2 another endpoint of the segment
-	 */
-	public void countSegment(Coordinate p1, Coordinate p2) {
-		/**
-		 * For each segment, check if it crosses 
-		 * a horizontal ray running from the test point in the positive x direction.
-		 */
-		
-		// check if the segment is strictly to the left of the test point
-		if (p1.x < p.x && p2.x < p.x)
-			return;
-		
-		// check if the point is equal to the current ring vertex
-		if (p.x == p2.x && p.y == p2.y) {
-			isPointOnSegment = true;
-			return;
-		}
-		/**
-		 * For horizontal segments, check if the point is on the segment.
-		 * Otherwise, horizontal segments are not counted.
-		 */
-		if (p1.y == p.y && p2.y == p.y) {
-			double minx = p1.x;
-			double maxx = p2.x;
-			if (minx > maxx) {
-				minx = p2.x;
-				maxx = p1.x;
-			}
-			if (p.x >= minx && p.x <= maxx) {
-				isPointOnSegment = true;
-			}
-			return;
-		}
-		/**
-		 * Evaluate all non-horizontal segments which cross a horizontal ray to the
-		 * right of the test pt. To avoid double-counting shared vertices, we use the
-		 * convention that
-		 * <ul>
-		 * <li>an upward edge includes its starting endpoint, and excludes its
-		 * final endpoint
-		 * <li>a downward edge excludes its starting endpoint, and includes its
-		 * final endpoint
-		 * </ul>
-		 */
-		if (((p1.y > p.y) && (p2.y <= p.y)) 
-				|| ((p2.y > p.y) && (p1.y <= p.y))) {
-			// translate the segment so that the test point lies on the origin
-			double x1 = p1.x - p.x;
-			double y1 = p1.y - p.y;
-			double x2 = p2.x - p.x;
-			double y2 = p2.y - p.y;
-
-			/**
-			 * The translated segment straddles the x-axis. Compute the sign of the
-			 * ordinate of intersection with the x-axis. (y2 != y1, so denominator
-			 * will never be 0.0)
-			 */
-			// double xIntSign = RobustDeterminant.signOfDet2x2(x1, y1, x2, y2) / (y2
-			// - y1);
-			// MD - faster & more robust computation?
-			double xIntSign = RobustDeterminant.signOfDet2x2(x1, y1, x2, y2);
-			if (xIntSign == 0.0) {
-				isPointOnSegment = true;
-				return;
-			}
-			if (y2 < y1)
-				xIntSign = -xIntSign;
-			// xsave = xInt;
-
-      //System.out.println("xIntSign(" + x1 + ", " + y1 + ", " + x2 + ", " + y2 + " = " + xIntSign);
-			// The segment crosses the ray if the sign is strictly positive.
-			if (xIntSign > 0.0) {
-				crossingCount++;
-			}
-		}
-	}
-	
-/**
- * Reports whether the point lies exactly on one of the supplied segments.
- * This method may be called at any time as segments are processed.
- * If the result of this method is <tt>true</tt>, 
- * no further segments need be supplied, since the result
- * will never change again.
- * 
- * @return true if the point lies exactly on a segment
- */
-	public boolean isOnSegment() { return isPointOnSegment; }
-	
-	/**
-	 * Gets the {@link Location} of the point relative to 
-	 * the ring, polygon
-	 * or multipolygon from which the processed segments were provided.
-	 * <p>
-	 * This method only determines the correct location 
-	 * if <b>all</b> relevant segments must have been processed. 
-	 * 
-	 * @return the Location of the point
-	 */
-	public int getLocation() 
-	{
-		if (isPointOnSegment)
-			return Location.BOUNDARY;
-		
-    // The point is in the interior of the ring if the number of X-crossings is
-		// odd.
-    if ((crossingCount % 2) == 1) {
-      return Location.INTERIOR;
-    }
-    return Location.EXTERIOR;
-	}
-    
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/RobustDeterminant.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/RobustDeterminant.java	(revision 28245)
+++ 	(revision )
@@ -1,374 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-
-/**
- * @version 1.7
- */
-
-/**
- * Implements an algorithm to compute the
- * sign of a 2x2 determinant for double precision values robustly.
- * It is a direct translation of code developed by Olivier Devillers.
- * <p>
- * The original code carries the following copyright notice:
- *
- * <pre>
- *************************************************************************
- * Author : Olivier Devillers
- * Olivier.Devillers@sophia.inria.fr
- * http:/www.inria.fr:/prisme/personnel/devillers/anglais/determinant.html
- **************************************************************************
- *
- **************************************************************************
- *              Copyright (c) 1995  by  INRIA Prisme Project
- *                  BP 93 06902 Sophia Antipolis Cedex, France.
- *                           All rights reserved
- **************************************************************************
- * </pre>
- *
- * @version 1.7
- */
-public class RobustDeterminant {
-
-  //public static int callCount = 0; // debugging only
-
-  /*
-  // test point to allow injecting test code
-  public static int signOfDet2x2(double x1, double y1, double x2, double y2) 
-  {
-    int d1 = originalSignOfDet2x2(x1, y1, x2, y2); 
-    int d2 = -originalSignOfDet2x2(y1, x1, x2, y2); 
-    assert d1 == -d2;
-    return d1;
-  }
-   */
-  
-  /*
-   * Test code to force a standard ordering of input ordinates.
-   * A possible fix for a rare problem where evaluation is order-dependent.
-   */
-  /*
-  public static int signOfDet2x2(double x1, double y1, double x2, double y2) 
-  {
-    if (x1 > x2) {
-      return -signOfDet2x2ordX(x2, y2, x1, y1);
-    }
-    return signOfDet2x2ordX(x1, y1, x2, y2);
-  }
-    
-  private static int signOfDet2x2ordX(double x1, double y1, double x2, double y2) 
-  {
-    if (y1 > y2) {
-      return -originalSignOfDet2x2(y1, x1, y2, x2);
-    }
-    return originalSignOfDet2x2(x1, y1, x2, y2);
-  }
-  //  */
-  
-  /**
-   * Computes the sign of the determinant of the 2x2 matrix
-   * with the given entries, in a robust way.
-   * 
-   * @return -1 if the determinant is negative,
-   * @return  1 if the determinant is positive,
-   * @return  0 if the determinant is 0.
-   */
-   //private static int originalSignOfDet2x2(double x1, double y1, double x2, double y2) {
-   public static int signOfDet2x2(double x1, double y1, double x2, double y2) {
-    // returns -1 if the determinant is negative,
-    // returns  1 if the determinant is positive,
-    // returns  0 if the determinant is null.
-    int sign;
-    double swap;
-    double k;
-    long count = 0;
-
-    //callCount++; // debugging only
-
-    sign = 1;
-
-    /*
-     *  testing null entries
-     */
-    if ((x1 == 0.0) || (y2 == 0.0)) {
-      if ((y1 == 0.0) || (x2 == 0.0)) {
-        return 0;
-      }
-      else if (y1 > 0) {
-        if (x2 > 0) {
-          return -sign;
-        }
-        else {
-          return sign;
-        }
-      }
-      else {
-        if (x2 > 0) {
-          return sign;
-        }
-        else {
-          return -sign;
-        }
-      }
-    }
-    if ((y1 == 0.0) || (x2 == 0.0)) {
-      if (y2 > 0) {
-        if (x1 > 0) {
-          return sign;
-        }
-        else {
-          return -sign;
-        }
-      }
-      else {
-        if (x1 > 0) {
-          return -sign;
-        }
-        else {
-          return sign;
-        }
-      }
-    }
-
-    /*
-     *  making y coordinates positive and permuting the entries
-     */
-    /*
-     *  so that y2 is the biggest one
-     */
-    if (0.0 < y1) {
-      if (0.0 < y2) {
-        if (y1 <= y2) {
-        }
-        else {
-          sign = -sign;
-          swap = x1;
-          x1 = x2;
-          x2 = swap;
-          swap = y1;
-          y1 = y2;
-          y2 = swap;
-        }
-      }
-      else {
-        if (y1 <= -y2) {
-          sign = -sign;
-          x2 = -x2;
-          y2 = -y2;
-        }
-        else {
-          swap = x1;
-          x1 = -x2;
-          x2 = swap;
-          swap = y1;
-          y1 = -y2;
-          y2 = swap;
-        }
-      }
-    }
-    else {
-      if (0.0 < y2) {
-        if (-y1 <= y2) {
-          sign = -sign;
-          x1 = -x1;
-          y1 = -y1;
-        }
-        else {
-          swap = -x1;
-          x1 = x2;
-          x2 = swap;
-          swap = -y1;
-          y1 = y2;
-          y2 = swap;
-        }
-      }
-      else {
-        if (y1 >= y2) {
-          x1 = -x1;
-          y1 = -y1;
-          x2 = -x2;
-          y2 = -y2;
-        }
-        else {
-          sign = -sign;
-          swap = -x1;
-          x1 = -x2;
-          x2 = swap;
-          swap = -y1;
-          y1 = -y2;
-          y2 = swap;
-        }
-      }
-    }
-
-    /*
-     *  making x coordinates positive
-     */
-    /*
-     *  if |x2| < |x1| one can conclude
-     */
-    if (0.0 < x1) {
-      if (0.0 < x2) {
-        if (x1 <= x2) {
-        }
-        else {
-          return sign;
-        }
-      }
-      else {
-        return sign;
-      }
-    }
-    else {
-      if (0.0 < x2) {
-        return -sign;
-      }
-      else {
-        if (x1 >= x2) {
-          sign = -sign;
-          x1 = -x1;
-          x2 = -x2;
-        }
-        else {
-          return -sign;
-        }
-      }
-    }
-
-    /*
-     *  all entries strictly positive   x1 <= x2 and y1 <= y2
-     */
-    while (true) {
-      count = count + 1;
-      // MD - UNSAFE HACK for testing only!
-//      k = (int) (x2 / x1);
-      k = Math.floor(x2 / x1);
-      x2 = x2 - k * x1;
-      y2 = y2 - k * y1;
-
-      /*
-       *  testing if R (new U2) is in U1 rectangle
-       */
-      if (y2 < 0.0) {
-        return -sign;
-      }
-      if (y2 > y1) {
-        return sign;
-      }
-
-      /*
-       *  finding R'
-       */
-      if (x1 > x2 + x2) {
-        if (y1 < y2 + y2) {
-          return sign;
-        }
-      }
-      else {
-        if (y1 > y2 + y2) {
-          return -sign;
-        }
-        else {
-          x2 = x1 - x2;
-          y2 = y1 - y2;
-          sign = -sign;
-        }
-      }
-      if (y2 == 0.0) {
-        if (x2 == 0.0) {
-          return 0;
-        }
-        else {
-          return -sign;
-        }
-      }
-      if (x2 == 0.0) {
-        return sign;
-      }
-
-      /*
-       *  exchange 1 and 2 role.
-       */
-      // MD - UNSAFE HACK for testing only!
-//      k = (int) (x1 / x2);
-      k = Math.floor(x1 / x2);
-      x1 = x1 - k * x2;
-      y1 = y1 - k * y2;
-
-      /*
-       *  testing if R (new U1) is in U2 rectangle
-       */
-      if (y1 < 0.0) {
-        return sign;
-      }
-      if (y1 > y2) {
-        return -sign;
-      }
-
-      /*
-       *  finding R'
-       */
-      if (x2 > x1 + x1) {
-        if (y2 < y1 + y1) {
-          return -sign;
-        }
-      }
-      else {
-        if (y2 > y1 + y1) {
-          return sign;
-        }
-        else {
-          x1 = x2 - x1;
-          y1 = y2 - y1;
-          sign = -sign;
-        }
-      }
-      if (y1 == 0.0) {
-        if (x1 == 0.0) {
-          return 0;
-        }
-        else {
-          return sign;
-        }
-      }
-      if (x1 == 0.0) {
-        return -sign;
-      }
-    }
-
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/RobustLineIntersector.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/RobustLineIntersector.java	(revision 28245)
+++ 	(revision )
@@ -1,372 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.algorithm;
-
-/**
- *@version 1.7
- */
-
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Envelope;
-
-/**
- * A robust version of {@link LineIntersector}.
- *
- * @version 1.7
- * @see RobustDeterminant
- */
-public class RobustLineIntersector
-    extends LineIntersector
-{
-
-  public RobustLineIntersector() {
-  }
-
-  public void computeIntersection(Coordinate p, Coordinate p1, Coordinate p2) {
-    isProper = false;
-    // do between check first, since it is faster than the orientation test
-    if (Envelope.intersects(p1, p2, p)) {
-      if ((CGAlgorithms.orientationIndex(p1, p2, p) == 0)
-          && (CGAlgorithms.orientationIndex(p2, p1, p) == 0)) {
-        isProper = true;
-        if (p.equals(p1) || p.equals(p2)) {
-          isProper = false;
-        }
-        result = POINT_INTERSECTION;
-        return;
-      }
-    }
-    result = NO_INTERSECTION;
-  }
-
-  protected int computeIntersect(
-                Coordinate p1, Coordinate p2,
-                Coordinate q1, Coordinate q2  ) {
-    isProper = false;
-
-    // first try a fast test to see if the envelopes of the lines intersect
-    if (! Envelope.intersects(p1, p2, q1, q2))
-      return NO_INTERSECTION;
-
-    // for each endpoint, compute which side of the other segment it lies
-    // if both endpoints lie on the same side of the other segment,
-    // the segments do not intersect
-    int Pq1 = CGAlgorithms.orientationIndex(p1, p2, q1);
-    int Pq2 = CGAlgorithms.orientationIndex(p1, p2, q2);
-
-    if ((Pq1>0 && Pq2>0) || (Pq1<0 && Pq2<0)) {
-      return NO_INTERSECTION;
-    }
-
-    int Qp1 = CGAlgorithms.orientationIndex(q1, q2, p1);
-    int Qp2 = CGAlgorithms.orientationIndex(q1, q2, p2);
-
-    if ((Qp1>0 && Qp2>0) || (Qp1<0 && Qp2<0)) {
-        return NO_INTERSECTION;
-    }
-
-    boolean collinear = Pq1 == 0
-         && Pq2 == 0
-         && Qp1 == 0
-         && Qp2 == 0;
-    if (collinear) {
-      return computeCollinearIntersection(p1, p2, q1, q2);
-    }
-    
-    /**
-     * At this point we know that there is a single intersection point
-     * (since the lines are not collinear).
-     */
-    
-    /**
-     *  Check if the intersection is an endpoint. If it is, copy the endpoint as
-     *  the intersection point. Copying the point rather than computing it
-     *  ensures the point has the exact value, which is important for
-     *  robustness. It is sufficient to simply check for an endpoint which is on
-     *  the other line, since at this point we know that the inputLines must
-     *  intersect.
-     */
-    if (Pq1 == 0 || Pq2 == 0 || Qp1 == 0 || Qp2 == 0) {
-      isProper = false;
-      
-      /**
-       * Check for two equal endpoints.  
-       * This is done explicitly rather than by the orientation tests
-       * below in order to improve robustness.
-       * 
-       * [An example where the orientation tests fail to be consistent is
-       * the following (where the true intersection is at the shared endpoint
-       * POINT (19.850257749638203 46.29709338043669)
-       * 
-       * LINESTRING ( 19.850257749638203 46.29709338043669, 20.31970698357233 46.76654261437082 ) 
-       * and 
-       * LINESTRING ( -48.51001596420236 -22.063180333403878, 19.850257749638203 46.29709338043669 )
-       * 
-       * which used to produce the INCORRECT result: (20.31970698357233, 46.76654261437082, NaN)
-       * 
-       */
-      if (p1.equals2D(q1) 
-      		|| p1.equals2D(q2)) {
-      	intPt[0] = p1;
-      }
-      else if (p2.equals2D(q1) 
-      		|| p2.equals2D(q2)) {
-      	intPt[0] = p2;
-      }
-      
-      /**
-       * Now check to see if any endpoint lies on the interior of the other segment.
-       */
-      else if (Pq1 == 0) {
-        intPt[0] = new Coordinate(q1);
-      }
-      else if (Pq2 == 0) {
-        intPt[0] = new Coordinate(q2);
-      }
-      else if (Qp1 == 0) {
-        intPt[0] = new Coordinate(p1);
-      }
-      else if (Qp2 == 0) {
-        intPt[0] = new Coordinate(p2);
-      }
-    }
-    else {
-      isProper = true;
-      intPt[0] = intersection(p1, p2, q1, q2);
-    }
-    return POINT_INTERSECTION;
-  }
-
-  private int computeCollinearIntersection(Coordinate p1, Coordinate p2,
-      Coordinate q1, Coordinate q2) {
-    boolean p1q1p2 = Envelope.intersects(p1, p2, q1);
-    boolean p1q2p2 = Envelope.intersects(p1, p2, q2);
-    boolean q1p1q2 = Envelope.intersects(q1, q2, p1);
-    boolean q1p2q2 = Envelope.intersects(q1, q2, p2);
-
-    if (p1q1p2 && p1q2p2) {
-      intPt[0] = q1;
-      intPt[1] = q2;
-      return COLLINEAR_INTERSECTION;
-    }
-    if (q1p1q2 && q1p2q2) {
-      intPt[0] = p1;
-      intPt[1] = p2;
-      return COLLINEAR_INTERSECTION;
-    }
-    if (p1q1p2 && q1p1q2) {
-      intPt[0] = q1;
-      intPt[1] = p1;
-      return q1.equals(p1) && !p1q2p2 && !q1p2q2 ? POINT_INTERSECTION : COLLINEAR_INTERSECTION;
-    }
-    if (p1q1p2 && q1p2q2) {
-      intPt[0] = q1;
-      intPt[1] = p2;
-      return q1.equals(p2) && !p1q2p2 && !q1p1q2 ? POINT_INTERSECTION : COLLINEAR_INTERSECTION;
-    }
-    if (p1q2p2 && q1p1q2) {
-      intPt[0] = q2;
-      intPt[1] = p1;
-      return q2.equals(p1) && !p1q1p2 && !q1p2q2 ? POINT_INTERSECTION : COLLINEAR_INTERSECTION;
-    }
-    if (p1q2p2 && q1p2q2) {
-      intPt[0] = q2;
-      intPt[1] = p2;
-      return q2.equals(p2) && !p1q1p2 && !q1p1q2 ? POINT_INTERSECTION : COLLINEAR_INTERSECTION;
-    }
-    return NO_INTERSECTION;
-  }
-
-  /**
-   * This method computes the actual value of the intersection point.
-   * To obtain the maximum precision from the intersection calculation,
-   * the coordinates are normalized by subtracting the minimum
-   * ordinate values (in absolute value).  This has the effect of
-   * removing common significant digits from the calculation to
-   * maintain more bits of precision.
-   */
-  private Coordinate intersection(
-    Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)
-  {
-    Coordinate intPt = intersectionWithNormalization(p1, p2, q1, q2);
-  	// testing only
-//    Coordinate intPt = safeHCoordinateIntersection(p1, p2, q1, q2);
-
-    /**
-     * Due to rounding it can happen that the computed intersection is
-     * outside the envelopes of the input segments.  Clearly this
-     * is inconsistent. 
-     * This code checks this condition and forces a more reasonable answer
-     * 
-     * MD - May 4 2005 - This is still a problem.  Here is a failure case:
-     *
-     * LINESTRING (2089426.5233462777 1180182.3877339689, 2085646.6891757075 1195618.7333999649)
-     * LINESTRING (1889281.8148903656 1997547.0560044837, 2259977.3672235999 483675.17050843034)
-     * int point = (2097408.2633752143,1144595.8008114607)
-     * 
-     * MD - Dec 14 2006 - This does not seem to be a failure case any longer
-     */
-    if (! isInSegmentEnvelopes(intPt)) {
-//      System.out.println("Intersection outside segment envelopes: " + intPt);
-//      System.out.println("Segments: " + this);
-      // compute a safer result
-      intPt = CentralEndpointIntersector.getIntersection(p1, p2, q1, q2);
-//      System.out.println("Snapped to " + intPt);
-    }
-
-    if (precisionModel != null) {
-      precisionModel.makePrecise(intPt);
-    }
-
-    return intPt;
-  }
-
-  private Coordinate intersectionWithNormalization(
-    Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)
-    {
-      Coordinate n1 = new Coordinate(p1);
-      Coordinate n2 = new Coordinate(p2);
-      Coordinate n3 = new Coordinate(q1);
-      Coordinate n4 = new Coordinate(q2);
-      Coordinate normPt = new Coordinate();
-      normalizeToEnvCentre(n1, n2, n3, n4, normPt);
-
-      Coordinate intPt = safeHCoordinateIntersection(n1, n2, n3, n4);
-
-      intPt.x += normPt.x;
-      intPt.y += normPt.y;
-      
-      return intPt;
-  }
-  
-  /**
-   * Computes a segment intersection using homogeneous coordinates.
-   * Round-off error can cause the raw computation to fail, 
-   * (usually due to the segments being approximately parallel).
-   * If this happens, a reasonable approximation is computed instead.
-   * 
-   * @param p1 a segment endpoint
-   * @param p2 a segment endpoint
-   * @param q1 a segment endpoint
-   * @param q2 a segment endpoint
-   * @return the computed intersection point
-   */
-  private Coordinate safeHCoordinateIntersection(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)
-  {
-    Coordinate intPt = null;
-    try {
-      intPt = HCoordinate.intersection(p1, p2, q1, q2);
-    }
-    catch (NotRepresentableException e) {
-//    	System.out.println("Not calculable: " + this);
-      // compute an approximate result
-      intPt = CentralEndpointIntersector.getIntersection(p1, p2, q1, q2);
- //     System.out.println("Snapped to " + intPt);
-    }
-    return intPt;
-  }
-
-  /**
-   * Normalize the supplied coordinates to
-   * so that the midpoint of their intersection envelope
-   * lies at the origin.
-   *
-   * @param n00
-   * @param n01
-   * @param n10
-   * @param n11
-   * @param normPt
-   */
-  private void normalizeToEnvCentre(
-    Coordinate n00,
-    Coordinate n01,
-    Coordinate n10,
-    Coordinate n11,
-    Coordinate normPt)
-  {
-    double minX0 = n00.x < n01.x ? n00.x : n01.x;
-    double minY0 = n00.y < n01.y ? n00.y : n01.y;
-    double maxX0 = n00.x > n01.x ? n00.x : n01.x;
-    double maxY0 = n00.y > n01.y ? n00.y : n01.y;
-
-    double minX1 = n10.x < n11.x ? n10.x : n11.x;
-    double minY1 = n10.y < n11.y ? n10.y : n11.y;
-    double maxX1 = n10.x > n11.x ? n10.x : n11.x;
-    double maxY1 = n10.y > n11.y ? n10.y : n11.y;
-
-    double intMinX = minX0 > minX1 ? minX0 : minX1;
-    double intMaxX = maxX0 < maxX1 ? maxX0 : maxX1;
-    double intMinY = minY0 > minY1 ? minY0 : minY1;
-    double intMaxY = maxY0 < maxY1 ? maxY0 : maxY1;
-
-    double intMidX = (intMinX + intMaxX) / 2.0;
-    double intMidY = (intMinY + intMaxY) / 2.0;
-    normPt.x = intMidX;
-    normPt.y = intMidY;
-
-    /*
-    // equilavalent code using more modular but slower method
-    Envelope env0 = new Envelope(n00, n01);
-    Envelope env1 = new Envelope(n10, n11);
-    Envelope intEnv = env0.intersection(env1);
-    Coordinate intMidPt = intEnv.centre();
-
-    normPt.x = intMidPt.x;
-    normPt.y = intMidPt.y;
-    */
-
-    n00.x -= normPt.x;    n00.y -= normPt.y;
-    n01.x -= normPt.x;    n01.y -= normPt.y;
-    n10.x -= normPt.x;    n10.y -= normPt.y;
-    n11.x -= normPt.x;    n11.y -= normPt.y;
-  }
-
-  /**
-   * Test whether a point lies in the envelopes of both input segments.
-   * A correctly computed intersection point should return <code>true</code>
-   * for this test.
-   * Since this test is for debugging purposes only, no attempt is
-   * made to optimize the envelope test.
-   *
-   * @return <code>true</code> if the input point lies within both input segment envelopes
-   */
-  private boolean isInSegmentEnvelopes(Coordinate intPt)
-  {
-    Envelope env0 = new Envelope(inputLines[0][0], inputLines[0][1]);
-    Envelope env1 = new Envelope(inputLines[1][0], inputLines[1][1]);
-    return env0.contains(intPt) && env1.contains(intPt);
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/package.html
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/algorithm/package.html	(revision 28245)
+++ 	(revision )
@@ -1,50 +1,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
-
--->
-</head>
-<body bgcolor="white">
-
-Contains classes and interfaces implementing fundamental computational geometry algorithms.
-
-<H3>Robustness</H3>
-
-Geometrical algorithms involve a combination of combinatorial and numerical computation.  As with
-all numerical computation using finite-precision numbers, the algorithms chosen are susceptible to
-problems of robustness.  A robustness problem occurs when a numerical calculation produces an
-incorrect answer for some inputs due to round-off errors.  Robustness problems are especially
-serious in geometric computation, since they can result in errors during topology building.
-<P>
-There are many approaches to dealing with the problem of robustness in geometrical computation.
-Not surprisingly, most robust algorithms are substantially more complex and less performant than
-the non-robust versions.  Fortunately, JTS is sensitive to robustness problems in only a few key
-functions (such as line intersection and the point-in-polygon test).  There are efficient robust
-algorithms available for these functions, and these algorithms are implemented in JTS.
-
-<H3>Computational Performance</H3>
-
-Runtime performance is an important consideration for a production-quality implementation of
-geometric algorithms.  The most computationally intensive algorithm used in JTS is intersection
-detection.  JTS methods need to determine both all intersection between the line segments in a
-single Geometry (self-intersection) and all intersections between the line segments of two different
-Geometries.
-<P>
-The obvious naive algorithm for intersection detection (comparing every segment with every other)
-has unacceptably slow performance.  There is a large literature of faster algorithms for intersection
-detection.  Unfortunately, many of them involve substantial code complexity.  JTS tries to balance code
-simplicity with performance gains.  It uses some simple techniques to produce substantial performance
-gains for common types of input data.
-
-
-<h2>Package Specification</h2>
-
-<ul>
-  <li>Java Topology Suite Technical Specifications
-  <li><A HREF="http://www.opengis.org/techno/specs.htm">
-      OpenGIS Simple Features Specification for SQL</A>
-</ul>
-
-</body>
-</html>
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Coordinate.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Coordinate.java	(revision 28245)
+++ 	(revision )
@@ -1,245 +1,0 @@
-/*
-* The JTS Topology Suite is a collection of Java classes that
-* implement the fundamental operations required to validate a given
-* geo-spatial data set to a known topological specification.
-*
-* Copyright (C) 2001 Vivid Solutions
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2.1 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*
-* For more information, contact:
-*
-*     Vivid Solutions
-*     Suite #1A
-*     2328 Government Street
-*     Victoria BC  V8T 5G5
-*     Canada
-*
-*     (250)385-6040
-*     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.io.Serializable;
-
-import com.vividsolutions.jts.util.Assert;
-
-
-/**
- * A lightweight class used to store coordinates
- * on the 2-dimensional Cartesian plane.
- * It is distinct from {@link Point}, which is a subclass of {@link Geometry}. 
- * Unlike objects of type {@link Point} (which contain additional
- * information such as an envelope, a precision model, and spatial reference
- * system information), a <code>Coordinate</code> only contains ordinate values
- * and accessor methods. <P>
- *
- * <code>Coordinate</code>s are two-dimensional points, with an additional Z-ordinate. 
- * JTS does not support any operations on the Z-ordinate except the basic accessor functions. 
- * If an Z-ordinate value is not specified or not defined, 
- * constructed coordinates have a Z-ordinate of <code>NaN</code>
- * (which is also the value of <code>NULL_ORDINATE</code>).  
- * The standard comparison functions ignore the Z-ordinate.
- *
- *@version 1.7
- */
-public class Coordinate implements Comparable<Coordinate>, Cloneable, Serializable {
-  private static final long serialVersionUID = 6683108902428366910L;
-  
-  /**
-   * The value used to indicate a null or missing ordinate value.
-   * In particular, used for the value of ordinates for dimensions 
-   * greater than the defined dimension of a coordinate.
-   */
-  public static final double NULL_ORDINATE = Double.NaN;
-  /**
-   *  The x-coordinate.
-   */
-  public double x;
-  /**
-   *  The y-coordinate.
-   */
-  public double y;
-  /**
-   *  The z-coordinate.
-   */
-  public double z;
-
-  /**
-   *  Constructs a <code>Coordinate</code> at (x,y,z).
-   *
-   *@param  x  the x-value
-   *@param  y  the y-value
-   *@param  z  the z-value
-   */
-  public Coordinate(double x, double y, double z) {
-    this.x = x;
-    this.y = y;
-    this.z = z;
-  }
-
-  /**
-   *  Constructs a <code>Coordinate</code> at (0,0,NaN).
-   */
-  public Coordinate() {
-    this(0.0, 0.0);
-  }
-
-  /**
-   *  Constructs a <code>Coordinate</code> having the same (x,y,z) values as
-   *  <code>other</code>.
-   *
-   *@param  c  the <code>Coordinate</code> to copy.
-   */
-  public Coordinate(Coordinate c) {
-    this(c.x, c.y, c.z);
-  }
-
-  /**
-   *  Constructs a <code>Coordinate</code> at (x,y,NaN).
-   *
-   *@param  x  the x-value
-   *@param  y  the y-value
-   */
-  public Coordinate(double x, double y) {
-    this(x, y, NULL_ORDINATE);
-  }
-
-  /**
-   *  Returns whether the planar projections of the two <code>Coordinate</code>s
-   *  are equal.
-   *
-   *@param  other  a <code>Coordinate</code> with which to do the 2D comparison.
-   *@return        <code>true</code> if the x- and y-coordinates are equal; the
-   *      z-coordinates do not have to be equal.
-   */
-  public boolean equals2D(Coordinate other) {
-    if (x != other.x) {
-      return false;
-    }
-
-    if (y != other.y) {
-      return false;
-    }
-
-    return true;
-  }
-
-  /**
-   *  Returns <code>true</code> if <code>other</code> has the same values for
-   *  the x and y ordinates.
-   *  Since Coordinates are 2.5D, this routine ignores the z value when making the comparison.
-   *
-   *@param  other  a <code>Coordinate</code> with which to do the comparison.
-   *@return        <code>true</code> if <code>other</code> is a <code>Coordinate</code>
-   *      with the same values for the x and y ordinates.
-   */
-  public boolean equals(Object other) {
-    if (!(other instanceof Coordinate)) {
-      return false;
-    }
-    return equals2D((Coordinate) other);
-  }
-
-  /**
-   *  Compares this {@link Coordinate} with the specified {@link Coordinate} for order.
-   *  This method ignores the z value when making the comparison.
-   *  Returns:
-   *  <UL>
-   *    <LI> -1 : this.x < other.x || ((this.x == other.x) && (this.y <
-   *    other.y))
-   *    <LI> 0 : this.x == other.x && this.y = other.y
-   *    <LI> 1 : this.x > other.x || ((this.x == other.x) && (this.y > other.y))
-   *
-   *  </UL>
-   *  Note: This method assumes that ordinate values
-   * are valid numbers.  NaN values are not handled correctly.
-   *
-   *@param  o  the <code>Coordinate</code> with which this <code>Coordinate</code>
-   *      is being compared
-   *@return    -1, zero, or 1 as this <code>Coordinate</code>
-   *      is less than, equal to, or greater than the specified <code>Coordinate</code>
-   */
-  public int compareTo(Coordinate o) {
-    Coordinate other = o;
-
-    if (x < other.x) return -1;
-    if (x > other.x) return 1;
-    if (y < other.y) return -1;
-    if (y > other.y) return 1;
-    return 0;
-  }
-
-  /**
-   *  Returns a <code>String</code> of the form <I>(x,y,z)</I> .
-   *
-   *@return    a <code>String</code> of the form <I>(x,y,z)</I>
-   */
-  public String toString() {
-    return "(" + x + ", " + y + ", " + z + ")";
-  }
-
-  public Object clone() {
-    try {
-      Coordinate coord = (Coordinate) super.clone();
-
-      return coord; // return the clone
-    } catch (CloneNotSupportedException e) {
-      Assert.shouldNeverReachHere(
-          "this shouldn't happen because this class is Cloneable");
-
-      return null;
-    }
-  }
-
-  /**
-   * Computes the 2-dimensional Euclidean distance to another location.
-   * The Z-ordinate is ignored.
-   * 
-   * @param p a point
-   * @return the 2-dimensional Euclidean distance between the locations
-   */
-  public double distance(Coordinate p) {
-    double dx = x - p.x;
-    double dy = y - p.y;
-
-    return Math.sqrt(dx * dx + dy * dy);
-  }
-
-  /**
-   * Gets a hashcode for this coordinate.
-   * 
-   * @return a hashcode for this coordinate
-   */
-  public int hashCode() {
-    //Algorithm from Effective Java by Joshua Bloch [Jon Aquino]
-    int result = 17;
-    result = 37 * result + hashCode(x);
-    result = 37 * result + hashCode(y);
-    return result;
-  }
-
-  /**
-   * Computes a hash code for a double value, using the algorithm from
-   * Joshua Bloch's book <i>Effective Java"</i>
-   * 
-   * @return a hashcode for the double value
-   */
-  public static int hashCode(double x) {
-    long f = Double.doubleToLongBits(x);
-    return (int)(f^(f>>>32));
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateArrays.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateArrays.java	(revision 28245)
+++ 	(revision )
@@ -1,174 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.util.Collection;
-
-/**
- * Useful utility functions for handling Coordinate arrays
- *
- * @version 1.7
- */
-public class CoordinateArrays {
-
-  private final static Coordinate[] coordArrayType = new Coordinate[0];
-
-
-  /**
-   * Determines which orientation of the {@link Coordinate} array
-   * is (overall) increasing.
-   * In other words, determines which end of the array is "smaller"
-   * (using the standard ordering on {@link Coordinate}).
-   * Returns an integer indicating the increasing direction.
-   * If the sequence is a palindrome, it is defined to be
-   * oriented in a positive direction.
-   *
-   * @param pts the array of Coordinates to test
-   * @return <code>1</code> if the array is smaller at the start
-   * or is a palindrome,
-   * <code>-1</code> if smaller at the end
-   */
-  public static int increasingDirection(Coordinate[] pts) {
-    for (int i = 0; i < pts.length / 2; i++) {
-      int j = pts.length - 1 - i;
-      // skip equal points on both ends
-      int comp = pts[i].compareTo(pts[j]);
-      if (comp != 0)
-        return comp;
-    }
-    // array must be a palindrome - defined to be in positive direction
-    return 1;
-  }
-
-  /**
-   * Converts the given Collection of Coordinates into a Coordinate array.
-   */
-  public static Coordinate[] toCoordinateArray(Collection<Coordinate> coordList)
-  {
-    return coordList.toArray(coordArrayType);
-  }
-
-  /**
-   * Returns whether #equals returns true for any two consecutive Coordinates
-   * in the given array.
-   */
-  public static boolean hasRepeatedPoints(Coordinate[] coord)
-  {
-    for (int i = 1; i < coord.length; i++) {
-      if (coord[i - 1].equals(coord[i]) ) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  /**
-   * If the coordinate array argument has repeated points,
-   * constructs a new array containing no repeated points.
-   * Otherwise, returns the argument.
-   * @see #hasRepeatedPoints(Coordinate[])
-   */
-  public static Coordinate[] removeRepeatedPoints(Coordinate[] coord)
-  {
-    if (! hasRepeatedPoints(coord)) return coord;
-    CoordinateList coordList = new CoordinateList(coord, false);
-    return coordList.toCoordinateArray();
-  }
-
-  /**
-   * Reverses the coordinates in an array in-place.
-   */
-  public static void reverse(Coordinate[] coord)
-  {
-    int last = coord.length - 1;
-    int mid = last / 2;
-    for (int i = 0; i <= mid; i++) {
-      Coordinate tmp = coord[i];
-      coord[i] = coord[last - i];
-      coord[last - i] = tmp;
-    }
-  }
-
-  /**
-   *  Returns the minimum coordinate, using the usual lexicographic comparison.
-   *
-   *@param  coordinates  the array to search
-   *@return              the minimum coordinate in the array, found using <code>compareTo</code>
-   *@see Coordinate#compareTo(Object)
-   */
-  public static Coordinate minCoordinate(Coordinate[] coordinates)
-  {
-    Coordinate minCoord = null;
-    for (int i = 0; i < coordinates.length; i++) {
-      if (minCoord == null || minCoord.compareTo(coordinates[i]) > 0) {
-        minCoord = coordinates[i];
-      }
-    }
-    return minCoord;
-  }
-  /**
-   *  Shifts the positions of the coordinates until <code>firstCoordinate</code>
-   *  is first.
-   *
-   *@param  coordinates      the array to rearrange
-   *@param  firstCoordinate  the coordinate to make first
-   */
-  public static void scroll(Coordinate[] coordinates, Coordinate firstCoordinate) {
-    int i = indexOf(firstCoordinate, coordinates);
-    if (i < 0) return;
-    Coordinate[] newCoordinates = new Coordinate[coordinates.length];
-    System.arraycopy(coordinates, i, newCoordinates, 0, coordinates.length - i);
-    System.arraycopy(coordinates, 0, newCoordinates, coordinates.length - i, i);
-    System.arraycopy(newCoordinates, 0, coordinates, 0, coordinates.length);
-  }
-
-  /**
-   *  Returns the index of <code>coordinate</code> in <code>coordinates</code>.
-   *  The first position is 0; the second, 1; etc.
-   *
-   *@param  coordinate   the <code>Coordinate</code> to search for
-   *@param  coordinates  the array to search
-   *@return              the position of <code>coordinate</code>, or -1 if it is
-   *      not found
-   */
-  public static int indexOf(Coordinate coordinate, Coordinate[] coordinates) {
-    for (int i = 0; i < coordinates.length; i++) {
-      if (coordinate.equals(coordinates[i])) {
-        return i;
-      }
-    }
-    return -1;
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateFilter.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateFilter.java	(revision 28245)
+++ 	(revision )
@@ -1,59 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-
-/**
- *  <code>Geometry</code> classes support the concept of applying a
- *  coordinate filter to every coordinate in the <code>Geometry</code>. A
- *  coordinate filter can either record information about each coordinate or
- *  change the coordinate in some way. Coordinate filters implement the
- *  interface <code>CoordinateFilter</code>. (<code>CoordinateFilter</code> is
- *  an example of the Gang-of-Four Visitor pattern). Coordinate filters can be
- *  used to implement such things as coordinate transformations, centroid and
- *  envelope computation, and many other functions.
- *
- *@version 1.7
- */
-public interface CoordinateFilter {
-
-  /**
-   *  Performs an operation with or on <code>coord</code>.
-   *
-   *@param  coord  a <code>Coordinate</code> to which the filter is applied.
-   */
-  void filter(Coordinate coord);
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateList.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateList.java	(revision 28245)
+++ 	(revision )
@@ -1,198 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.util.ArrayList;
-
-/**
- * A list of {@link Coordinate}s, which may
- * be set to prevent repeated coordinates from occuring in the list.
- *
- *
- * @version 1.7
- */
-public class CoordinateList
-  extends ArrayList
-{
-  //With contributions from Markus Schaber [schabios@logi-track.com]
-  //[Jon Aquino 2004-03-25]
-  private final static Coordinate[] coordArrayType = new Coordinate[0];
-
-  /**
-   * Constructs a new list without any coordinates
-   */
-  public CoordinateList()
-  { super();
-  }
-
-  /**
-   * Constructs a new list from an array of Coordinates, allowing repeated points.
-   * (I.e. this constructor produces a {@link CoordinateList} with exactly the same set of points
-   * as the input array.)
-   * 
-   * @param coord the initial coordinates
-   */
-  public CoordinateList(Coordinate[] coord)
-  {
-  	ensureCapacity(coord.length);
-    add(coord, true);
-  }
-
-  /**
-   * Constructs a new list from an array of Coordinates,
-   * allowing caller to specify if repeated points are to be removed.
-   *
-   * @param coord the array of coordinates to load into the list
-   * @param allowRepeated if <code>false</code>, repeated points are removed
-   */
-  public CoordinateList(Coordinate[] coord, boolean allowRepeated)
-  {
-  	ensureCapacity(coord.length);
-    add(coord, allowRepeated);
-  }
-
-
-  /** 
-   * Adds an array of coordinates to the list.
-   * @param coord The coordinates
-   * @param allowRepeated if set to false, repeated coordinates are collapsed
-   * @param direction if false, the array is added in reverse order
-   * @return true (as by general collection contract)
-   */
-  public boolean add(Coordinate[] coord, boolean allowRepeated, boolean direction)
-  {
-    if (direction) {
-      for (int i = 0; i < coord.length; i++) {
-        add(coord[i], allowRepeated);
-      }
-    }
-    else {
-      for (int i = coord.length - 1; i >= 0; i--) {
-        add(coord[i], allowRepeated);
-      }
-    }
-    return true;
-  }
-
-
-  /** 
-   * Adds an array of coordinates to the list.
-   * @param coord The coordinates
-   * @param allowRepeated if set to false, repeated coordinates are collapsed
-   * @return true (as by general collection contract)
-   */
-  public boolean add(Coordinate[] coord, boolean allowRepeated)
-  {
-    add(coord, allowRepeated, true);
-    return true;
-  }
-
-
-  /**
-   * Adds a coordinate to the end of the list.
-   * 
-   * @param coord The coordinates
-   * @param allowRepeated if set to false, repeated coordinates are collapsed
-   */
-  public void add(Coordinate coord, boolean allowRepeated)
-  {
-    // don't add duplicate coordinates
-    if (! allowRepeated) {
-      if (size() >= 1) {
-        Coordinate last = (Coordinate) get(size() - 1);
-        if (last.equals2D(coord)) return;
-      }
-    }
-    super.add(coord);
-  }
-
-  /**
-   * Inserts the specified coordinate at the specified position in this list.
-   * 
-   * @param i the position at which to insert
-   * @param coord the coordinate to insert
-   * @param allowRepeated if set to false, repeated coordinates are collapsed
-   */
-  public void add(int i, Coordinate coord, boolean allowRepeated)
-  {
-    // don't add duplicate coordinates
-    if (! allowRepeated) {
-      int size = size();
-      if (size > 0) {
-        if (i > 0) {
-          Coordinate prev = (Coordinate) get(i - 1);
-          if (prev.equals2D(coord)) return;
-        }
-        if (i < size) {
-          Coordinate next = (Coordinate) get(i);
-          if (next.equals2D(coord)) return;
-        }
-      }
-    }
-    super.add(i, coord);
-  }
-
-
-  /**
-   * Ensure this coordList is a ring, by adding the start point if necessary
-   */
-  public void closeRing()
-  {
-    if (size() > 0)
-      add(new Coordinate((Coordinate) get(0)), false);
-  }
-
-  /** Returns the Coordinates in this collection.
-   *
-   * @return the coordinates
-   */
-  public Coordinate[] toCoordinateArray()
-  {
-    return (Coordinate[]) toArray(coordArrayType);
-  }
-
-  /**
-   * Returns a deep copy of this <tt>CoordinateList</tt> instance.
-   *
-   * @return a clone of this <tt>CoordinateList</tt> instance
-   */
-  public Object clone() {
-      CoordinateList clone = (CoordinateList) super.clone();
-      for (int i = 0; i < this.size(); i++) {
-          clone.add(i, ((Coordinate) this.get(i)).clone());
-      }
-      return clone;
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateSequence.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateSequence.java	(revision 28245)
+++ 	(revision )
@@ -1,178 +1,0 @@
-/*
-* The JTS Topology Suite is a collection of Java classes that
-* implement the fundamental operations required to validate a given
-* geo-spatial data set to a known topological specification.
-*
-* Copyright (C) 2001 Vivid Solutions
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2.1 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*
-* For more information, contact:
-*
-*     Vivid Solutions
-*     Suite #1A
-*     2328 Government Street
-*     Victoria BC  V8T 5G5
-*     Canada
-*
-*     (250)385-6040
-*     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import com.vividsolutions.jts.geom.impl.CoordinateArraySequenceFactory;
-
-/**
- * The internal representation of a list of coordinates inside a Geometry.
- * <p>
- * This allows Geometries to store their
- * points using something other than the JTS {@link Coordinate} class. 
- * For example, a storage-efficient implementation
- * might store coordinate sequences as an array of x's
- * and an array of y's. 
- * Or a custom coordinate class might support extra attributes like M-values.
- * <p>
- * Implementing a custom coordinate storage structure
- * requires implementing the {@link CoordinateSequence} and
- * {@link CoordinateSequenceFactory} interfaces. 
- * To use the custom CoordinateSequence, create a
- * new {@link GeometryFactory} parameterized by the CoordinateSequenceFactory
- * The {@link GeometryFactory} can then be used to create new {@link Geometry}s.
- * The new Geometries
- * will use the custom CoordinateSequence implementation.
- * <p>
- * For an example, see the code for
- * {@link ExtendedCoordinateExample}.
- *
- * @see CoordinateArraySequenceFactory
- * @see PackedCoordinateSequenceFactory
- * @see ExtendedCoordinateExample
- *
- * @version 1.7
- */
-public interface CoordinateSequence
-    extends Cloneable
-{
-  /**
-   * Standard ordinate index values
-   */
-  int X = 0;
-  int Y = 1;
-  int Z = 2;
-
-  /**
-   * Returns the dimension (number of ordinates in each coordinate)
-   * for this sequence.
-   *
-   * @return the dimension of the sequence.
-   */
-  int getDimension();
-
-  /**
-   * Returns (possibly a copy of) the i'th coordinate in this sequence.
-   * Whether or not the Coordinate returned is the actual underlying
-   * Coordinate or merely a copy depends on the implementation.
-   * <p>
-   * Note that in the future the semantics of this method may change
-   * to guarantee that the Coordinate returned is always a copy.
-   * Callers should not to assume that they can modify a CoordinateSequence by
-   * modifying the object returned by this method.
-   *
-   * @param i the index of the coordinate to retrieve
-   * @return the i'th coordinate in the sequence
-   */
-  Coordinate getCoordinate(int i);
-
-
-  /**
-   * Copies the i'th coordinate in the sequence to the supplied
-   * {@link Coordinate}.  Only the first two dimensions are copied.
-   *
-   * @param index the index of the coordinate to copy
-   * @param coord a {@link Coordinate} to receive the value
-   */
-  void getCoordinate(int index, Coordinate coord);
-
-  /**
-   * Returns ordinate X (0) of the specified coordinate.
-   *
-   * @param index
-   * @return the value of the X ordinate in the index'th coordinate
-   */
-  double getX(int index);
-
-  /**
-   * Returns ordinate Y (1) of the specified coordinate.
-   *
-   * @param index
-   * @return the value of the Y ordinate in the index'th coordinate
-   */
-  double getY(int index);
-
-  /**
-   * Returns the ordinate of a coordinate in this sequence.
-   * Ordinate indices 0 and 1 are assumed to be X and Y.
-   * Ordinates indices greater than 1 have user-defined semantics
-   * (for instance, they may contain other dimensions or measure values).
-   *
-   * @param index  the coordinate index in the sequence
-   * @param ordinateIndex the ordinate index in the coordinate (in range [0, dimension-1])
-   */
-  double getOrdinate(int index, int ordinateIndex);
-
-  /**
-   * Returns the number of coordinates in this sequence.
-   * @return the size of the sequence
-   */
-  int size();
-
-  /**
-   * Sets the value for a given ordinate of a coordinate in this sequence.
-   *
-   * @param index  the coordinate index in the sequence
-   * @param ordinateIndex the ordinate index in the coordinate (in range [0, dimension-1])
-   * @param value  the new ordinate value
-   */
-  void setOrdinate(int index, int ordinateIndex, double value);
-
-  /**
-   * Returns (possibly copies of) the Coordinates in this collection.
-   * Whether or not the Coordinates returned are the actual underlying
-   * Coordinates or merely copies depends on the implementation. Note that
-   * if this implementation does not store its data as an array of Coordinates,
-   * this method will incur a performance penalty because the array needs to
-   * be built from scratch.
-   *
-   * @return a array of coordinates containing the point values in this sequence
-   */
-  Coordinate[] toCoordinateArray();
-
-  /**
-   * Expands the given {@link Envelope} to include the coordinates in the sequence.
-   * Allows implementing classes to optimize access to coordinate values.
-   *
-   * @param env the envelope to expand
-   * @return a ref to the expanded envelope
-   */
-  Envelope expandEnvelope(Envelope env);
-
-  /**
-   * Returns a deep copy of this collection.
-   * Called by Geometry#clone.
-   *
-   * @return a copy of the coordinate sequence containing copies of all points
-   */
-  Object clone();
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateSequenceComparator.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateSequenceComparator.java	(revision 28245)
+++ 	(revision )
@@ -1,120 +1,0 @@
-package com.vividsolutions.jts.geom;
-
-import java.util.Comparator;
-
-/**
- * Compares two {@link CoordinateSequence}s.
- * For sequences of the same dimension, the ordering is lexicographic.
- * Otherwise, lower dimensions are sorted before higher.
- * The dimensions compared can be limited; if this is done
- * ordinate dimensions above the limit will not be compared.
- * <p>
- * If different behaviour is required for comparing size, dimension, or
- * coordinate values, any or all methods can be overridden.
- *
- */
-public class CoordinateSequenceComparator
-	implements Comparator<Object>
-{
-  /**
-   * Compare two <code>double</code>s, allowing for NaN values.
-   * NaN is treated as being less than any valid number.
-   *
-   * @param a a <code>double</code>
-   * @param b a <code>double</code>
-   * @return -1, 0, or 1 depending on whether a is less than, equal to or greater than b
-   */
-  public static int compare(double a, double b)
-  {
-    if (a < b) return -1;
-    if (a > b) return 1;
-
-    if (Double.isNaN(a)) {
-      if (Double.isNaN(b)) return 0;
-      return -1;
-    }
-
-    if (Double.isNaN(b)) return 1;
-    return 0;
-  }
-
-  /**
-   * The number of dimensions to test
-   */
-  protected int dimensionLimit;
-
-  /**
-   * Creates a comparator which will test all dimensions.
-   */
-  public CoordinateSequenceComparator()
-  {
-    dimensionLimit = Integer.MAX_VALUE;
-  }
-
-  /**
-   * Compares two {@link CoordinateSequence}s for relative order.
-   *
-   * @param o1 a {@link CoordinateSequence}
-   * @param o2 a {@link CoordinateSequence}
-   * @return -1, 0, or 1 depending on whether o1 is less than, equal to, or greater than o2
-   */
-  public int compare(Object o1, Object o2)
-  {
-    CoordinateSequence s1 = (CoordinateSequence) o1;
-    CoordinateSequence s2 = (CoordinateSequence) o2;
-
-    int size1 = s1.size();
-    int size2 = s2.size();
-
-    int dim1 = s1.getDimension();
-    int dim2 = s2.getDimension();
-
-    int minDim = dim1;
-    if (dim2 < minDim)
-      minDim = dim2;
-    boolean dimLimited = false;
-    if (dimensionLimit <= minDim) {
-      minDim = dimensionLimit;
-      dimLimited = true;
-    }
-
-    // lower dimension is less than higher
-    if (! dimLimited) {
-      if (dim1 < dim2) return -1;
-      if (dim1 > dim2) return 1;
-    }
-
-    // lexicographic ordering of point sequences
-    int i = 0;
-    while (i < size1 && i < size2) {
-      int ptComp = compareCoordinate(s1, s2, i, minDim);
-      if (ptComp != 0) return ptComp;
-      i++;
-    }
-    if (i < size1) return 1;
-    if (i < size2) return -1;
-
-    return 0;
-  }
-
-  /**
-   * Compares the same coordinate of two {@link CoordinateSequence}s
-   * along the given number of dimensions.
-   *
-   * @param s1 a {@link CoordinateSequence}
-   * @param s2 a {@link CoordinateSequence}
-   * @param i the index of the coordinate to test
-   * @param dimension the number of dimensiosn to test
-   * @return -1, 0, or 1 depending on whether s1[i] is less than, equal to, or greater than s2[i]
-   */
-  protected int compareCoordinate(CoordinateSequence s1, CoordinateSequence s2, int i, int dimension)
-  {
-    for (int d = 0; d < dimension; d++) {
-      double ord1 = s1.getOrdinate(i, d);
-      double ord2 = s2.getOrdinate(i, d);
-      int comp = compare(ord1, ord2);
-      if (comp != 0) return comp;
-    }
-    return 0;
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateSequenceFactory.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateSequenceFactory.java	(revision 28245)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
-* The JTS Topology Suite is a collection of Java classes that
-* implement the fundamental operations required to validate a given
-* geo-spatial data set to a known topological specification.
-*
-* Copyright (C) 2001 Vivid Solutions
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2.1 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*
-* For more information, contact:
-*
-*     Vivid Solutions
-*     Suite #1A
-*     2328 Government Street
-*     Victoria BC  V8T 5G5
-*     Canada
-*
-*     (250)385-6040
-*     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-/**
- * A factory to create concrete instances of {@link CoordinateSequence}s.
- * Used to configure {@link GeometryFactory}s
- * to provide specific kinds of CoordinateSequences.
- *
- * @version 1.7
- */
-public interface CoordinateSequenceFactory
-{
-
-  /**
-   * Returns a {@link CoordinateSequence} based on the given array.
-   * Whether the array is copied or simply referenced
-   * is implementation-dependent.
-   * This method must handle null arguments by creating an empty sequence.
-   *
-   * @param coordinates the coordinates
-   */
-  CoordinateSequence create(Coordinate[] coordinates);
-
-
-  /**
-   * Creates a {@link CoordinateSequence} of the specified size and dimension.
-   * For this to be useful, the {@link CoordinateSequence} implementation must
-   * be mutable.
-   *
-   * @param size the number of coordinates in the sequence
-   * @param dimension the dimension of the coordinates in the sequence (if user-specifiable,
-   * otherwise ignored)
-   */
-  CoordinateSequence create(int size, int dimension);
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateSequenceFilter.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateSequenceFilter.java	(revision 28245)
+++ 	(revision )
@@ -1,89 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-
-/**
- *  Interface for classes which provide operations that
- *  can be applied to the coordinates in a {@link CoordinateSequence}. 
- *  A CoordinateSequence filter can either record information about each coordinate or
- *  change the coordinate in some way. CoordinateSequence filters can be
- *  used to implement such things as coordinate transformations, centroid and
- *  envelope computation, and many other functions.
- *  For maximum efficiency, the execution of filters can be short-circuited.
- *  {@link Geometry} classes support the concept of applying a
- *  <code>CoordinateSequenceFilter</code> to each 
- *  {@link CoordinateSequence}s they contain. 
- *  <p>
- *  <code>CoordinateSequenceFilter</code> is
- *  an example of the Gang-of-Four Visitor pattern. 
- *
- *@see Geometry#apply(CoordinateSequenceFilter)
- *@author Martin Davis
- *@version 1.7
- */
-public interface CoordinateSequenceFilter 
-{
-  /**
-   * Performs an operation on a coordinate in a {@link CoordinateSequence}.
-   *
-   *@param seq  the <code>CoordinateSequence</code> to which the filter is applied
-   *@param i the index of the coordinate to apply the filter to
-   */
-  void filter(CoordinateSequence seq, int i);
-  
-  /**
-   * Reports whether the application of this filter can be terminated.
-   * Once this method returns <tt>false</tt>, it should 
-   * continue to return <tt>false</tt> on every subsequent call.
-   * 
-   * @return true if the application of this filter can be terminated.
-   */
-  boolean isDone();
-  
-  /**
-   * Reports whether the execution of this filter
-   * has modified the coordinates of the geometry.
-   * If so, {@link Geometry#geometryChanged} will be executed
-   * after this filter has finished being executed.
-   * <p>
-   * Most filters can simply return a constant value reflecting
-   * whether they are able to change the coordinates.
-   * 
-   * @return true if this filter has changed the coordinates of the geometry
-   */
-  boolean isGeometryChanged();
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateSequences.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/CoordinateSequences.java	(revision 28245)
+++ 	(revision )
@@ -1,74 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-
-/**
- * Utility functions for manipulating {@link CoordinateSequence}s
- *
- * @version 1.7
- */
-public class CoordinateSequences {
-
-  /**
-   * Reverses the coordinates in a sequence in-place.
-   */
-  public static void reverse(CoordinateSequence seq)
-  {
-    int last = seq.size() - 1;
-    int mid = last / 2;
-    for (int i = 0; i <= mid; i++) {
-      swap(seq, i, last - i);
-    }
-  }
-
-  /**
-   * Swaps two coordinates in a sequence.
-   *
-   * @param seq
-   * @param i
-   * @param j
-   */
-  public static void swap(CoordinateSequence seq, int i, int j)
-  {
-    if (i == j) return;
-    for (int dim = 0; dim < seq.getDimension(); dim++) {
-      double tmp = seq.getOrdinate(i, dim);
-      seq.setOrdinate(i, dim, seq.getOrdinate(j, dim));
-      seq.setOrdinate(j, dim, tmp);
-    }
-  }
-  
-  
-  
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/DefaultCoordinateSequence.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/DefaultCoordinateSequence.java	(revision 28245)
+++ 	(revision )
@@ -1,198 +1,0 @@
-/*
-* The JTS Topology Suite is a collection of Java classes that
-* implement the fundamental operations required to validate a given
-* geo-spatial data set to a known topological specification.
-*
-* Copyright (C) 2001 Vivid Solutions
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2.1 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*
-* For more information, contact:
-*
-*     Vivid Solutions
-*     Suite #1A
-*     2328 Government Street
-*     Victoria BC  V8T 5G5
-*     Canada
-*
-*     (250)385-6040
-*     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-import java.io.Serializable;
-
-/**
- * The CoordinateSequence implementation that Geometries use by default. In
- * this implementation, Coordinates returned by #toArray and #get are live --
- * parties that change them are actually changing the
- * DefaultCoordinateSequence's underlying data.
- *
- * @version 1.7
- *
- * @deprecated no longer used
- */
-class DefaultCoordinateSequence
-    implements CoordinateSequence, Serializable
-{
-  //With contributions from Markus Schaber [schabios@logi-track.com] 2004-03-26
-  private static final long serialVersionUID = -915438501601840650L;
-  private Coordinate[] coordinates;
-
-  /**
-   * Constructs a DefaultCoordinateSequence based on the given array (the
-   * array is not copied).
-   *
-   * @param coordinates the coordinate array that will be referenced.
-   */
-  public DefaultCoordinateSequence(Coordinate[] coordinates) {
-    if (Geometry.hasNullElements(coordinates)) {
-      throw new IllegalArgumentException("Null coordinate");
-    }
-    this.coordinates = coordinates;
-  }
-
-
-  /**
-   * Constructs a sequence of a given size, populated
-   * with new {@link Coordinate}s.
-   *
-   * @param size the size of the sequence to create
-   */
-  public DefaultCoordinateSequence(int size) {
-    coordinates = new Coordinate[size];
-    for (int i = 0; i < size; i++) {
-      coordinates[i] = new Coordinate();
-    }
-  }
-
-  /**
-   * @see com.vividsolutions.jts.geom.CoordinateSequence#getDimension()
-   */
-  public int getDimension() { return 3; }
-
-  /**
-   * Get the Coordinate with index i.
-   *
-   * @param i
-   *                  the index of the coordinate
-   * @return the requested Coordinate instance
-   */
-  public Coordinate getCoordinate(int i) {
-    return coordinates[i];
-  }
-
-  /**
-   * @see com.vividsolutions.jts.geom.CoordinateSequence#getX(int)
-   */
-  public void getCoordinate(int index, Coordinate coord) {
-    coord.x = coordinates[index].x;
-    coord.y = coordinates[index].y;
-  }
-
-  /**
-   * @see com.vividsolutions.jts.geom.CoordinateSequence#getX(int)
-   */
-  public double getX(int index) {
-    return coordinates[index].x;
-  }
-
-  /**
-   * @see com.vividsolutions.jts.geom.CoordinateSequence#getY(int)
-   */
-  public double getY(int index) {
-    return coordinates[index].y;
-  }
-
-  /**
-   * @see com.vividsolutions.jts.geom.CoordinateSequence#getOrdinate(int, int)
-   */
-  public double getOrdinate(int index, int ordinateIndex)
-  {
-    switch (ordinateIndex) {
-      case CoordinateSequence.X:  return coordinates[index].x;
-      case CoordinateSequence.Y:  return coordinates[index].y;
-      case CoordinateSequence.Z:  return coordinates[index].z;
-    }
-    return Double.NaN;
-  }
-  /**
-   * @see com.vividsolutions.jts.geom.CoordinateSequence#setOrdinate(int, int, double)
-   */
-  public void setOrdinate(int index, int ordinateIndex, double value)
-  {
-    switch (ordinateIndex) {
-      case CoordinateSequence.X:  coordinates[index].x = value; break;
-      case CoordinateSequence.Y:  coordinates[index].y = value; break;
-      case CoordinateSequence.Z:  coordinates[index].z = value; break;
-    }
-  }
-  /**
-   * Creates a deep copy of the Object
-   *
-   * @return The deep copy
-   */
-  public Object clone() {
-    Coordinate[] cloneCoordinates = new Coordinate[size()];
-    for (int i = 0; i < coordinates.length; i++) {
-      cloneCoordinates[i] = (Coordinate) coordinates[i].clone();
-    }
-    return new DefaultCoordinateSequence(cloneCoordinates);
-  }
-  /**
-   * Returns the size of the coordinate sequence
-   *
-   * @return the number of coordinates
-   */
-  public int size() {
-    return coordinates.length;
-  }
-  /**
-   * This method exposes the internal Array of Coordinate Objects
-   *
-   * @return the Coordinate[] array.
-   */
-  public Coordinate[] toCoordinateArray() {
-    return coordinates;
-  }
-
-  public Envelope expandEnvelope(Envelope env)
-  {
-    for (int i = 0; i < coordinates.length; i++ ) {
-      env.expandToInclude(coordinates[i]);
-    }
-    return env;
-  }
-
-  /**
-   * Returns the string Representation of the coordinate array
-   *
-   * @return The string
-   */
-  public String toString() {
-    if (coordinates.length > 0) {
-      StringBuffer strBuf = new StringBuffer(17 * coordinates.length);
-      strBuf.append('(');
-      strBuf.append(coordinates[0]);
-      for (int i = 1; i < coordinates.length; i++) {
-        strBuf.append(", ");
-        strBuf.append(coordinates[i]);
-      }
-      strBuf.append(')');
-      return strBuf.toString();
-    } else {
-      return "()";
-    }
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/DefaultCoordinateSequenceFactory.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/DefaultCoordinateSequenceFactory.java	(revision 28245)
+++ 	(revision )
@@ -1,86 +1,0 @@
-
-/*
-* The JTS Topology Suite is a collection of Java classes that
-* implement the fundamental operations required to validate a given
-* geo-spatial data set to a known topological specification.
-*
-* Copyright (C) 2001 Vivid Solutions
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2.1 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*
-* For more information, contact:
-*
-*     Vivid Solutions
-*     Suite #1A
-*     2328 Government Street
-*     Victoria BC  V8T 5G5
-*     Canada
-*
-*     (250)385-6040
-*     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.io.Serializable;
-
-/**
- * Creates CoordinateSequences represented as an array of {@link Coordinate}s.
- *
- * @version 1.7
- *
- * @deprecated no longer used
- */
-public class DefaultCoordinateSequenceFactory
-    implements CoordinateSequenceFactory, Serializable
-{
-  private static final long serialVersionUID = -4099577099607551657L;
-  private static final DefaultCoordinateSequenceFactory instanceObject = new DefaultCoordinateSequenceFactory();
-
-  public DefaultCoordinateSequenceFactory() {
-  }
-
-  private Object readResolve() {
-  	// see http://www.javaworld.com/javaworld/javatips/jw-javatip122.html
-    return DefaultCoordinateSequenceFactory.instance();
-  }
-
-  /**
-   * Returns the singleton instance of DefaultCoordinateSequenceFactory
-   */
-  public static DefaultCoordinateSequenceFactory instance() {
-    return instanceObject;
-  }
-
-
-
-  /**
-   * Returns a DefaultCoordinateSequence based on the given array (the array is
-   * not copied).
-   *
-   * @param coordinates
-   *            the coordinates, which may not be null nor contain null
-   *            elements
-   */
-  public CoordinateSequence create(Coordinate[] coordinates) {
-    return new DefaultCoordinateSequence(coordinates);
-  }
-
-  /**
-   * @see com.vividsolutions.jts.geom.CoordinateSequenceFactory#create(int, int)
-   */
-  public CoordinateSequence create(int size, int dimension) {
-    return new DefaultCoordinateSequence(size);
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Dimension.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Dimension.java	(revision 28245)
+++ 	(revision )
@@ -1,134 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-/**
- * Provides constants representing the dimensions of a point, a curve and a surface.
- * Also provides constants representing the dimensions of the empty geometry and
- * non-empty geometries, and the wildcard constant {@link #DONTCARE} meaning "any dimension".
- * These constants are used as the entries in {@link IntersectionMatrix}s.
- * 
- * @version 1.7
- */
-public class Dimension {
-
-  /**
-   *  Dimension value of a point (0).
-   */
-  public final static int P = 0;
-
-  /**
-   *  Dimension value of a curve (1).
-   */
-  public final static int L = 1;
-
-  /**
-   *  Dimension value of a surface (2).
-   */
-  public final static int A = 2;
-
-  /**
-   *  Dimension value of the empty geometry (-1).
-   */
-  public final static int FALSE = -1;
-
-  /**
-   *  Dimension value of non-empty geometries (= {P, L, A}).
-   */
-  public final static int TRUE = -2;
-
-  /**
-   *  Dimension value for any dimension (= {FALSE, TRUE}).
-   */
-  public final static int DONTCARE = -3;
-
-  /**
-   *  Converts the dimension value to a dimension symbol, for example, <code>TRUE => 'T'</code>
-   *  .
-   *
-   *@param  dimensionValue  a number that can be stored in the <code>IntersectionMatrix</code>
-   *      . Possible values are <code>{TRUE, FALSE, DONTCARE, 0, 1, 2}</code>.
-   *@return                 a character for use in the string representation of
-   *      an <code>IntersectionMatrix</code>. Possible values are <code>{T, F, * , 0, 1, 2}</code>
-   *      .
-   */
-  public static char toDimensionSymbol(int dimensionValue) {
-    switch (dimensionValue) {
-      case FALSE:
-        return 'F';
-      case TRUE:
-        return 'T';
-      case DONTCARE:
-        return '*';
-      case P:
-        return '0';
-      case L:
-        return '1';
-      case A:
-        return '2';
-    }
-    throw new IllegalArgumentException("Unknown dimension value: " + dimensionValue);
-  }
-
-  /**
-   *  Converts the dimension symbol to a dimension value, for example, <code>'*' => DONTCARE</code>
-   *  .
-   *
-   *@param  dimensionSymbol  a character for use in the string representation of
-   *      an <code>IntersectionMatrix</code>. Possible values are <code>{T, F, * , 0, 1, 2}</code>
-   *      .
-   *@return a number that can be stored in the <code>IntersectionMatrix</code>
-   *      . Possible values are <code>{TRUE, FALSE, DONTCARE, 0, 1, 2}</code>.
-   */
-  public static int toDimensionValue(char dimensionSymbol) {
-    switch (Character.toUpperCase(dimensionSymbol)) {
-      case 'F':
-        return FALSE;
-      case 'T':
-        return TRUE;
-      case '*':
-        return DONTCARE;
-      case '0':
-        return P;
-      case '1':
-        return L;
-      case '2':
-        return A;
-    }
-    throw new IllegalArgumentException("Unknown dimension symbol: " + dimensionSymbol);
-  }
-}
-
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Envelope.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Envelope.java	(revision 28245)
+++ 	(revision )
@@ -1,666 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.io.Serializable;
-
-/**
- *  Defines a rectangular region of the 2D coordinate plane.
- *  It is often used to represent the bounding box of a {@link Geometry},
- *  e.g. the minimum and maximum x and y values of the {@link Coordinate}s.
- *  <p>
- *  Note that Envelopes support infinite or half-infinite regions, by using the values of
- *  <code>Double.POSITIVE_INFINITY</code> and <code>Double.NEGATIVE_INFINITY</code>.
- *  <p>
- *  When Envelope objects are created or initialized,
- *  the supplies extent values are automatically sorted into the correct order.
- *
- *@version 1.7
- */
-public class Envelope
-    implements Serializable
-{
-    private static final long serialVersionUID = 5873921885273102420L;
-
-    public int hashCode() {
-        //Algorithm from Effective Java by Joshua Bloch [Jon Aquino]
-        int result = 17;
-        result = 37 * result + Coordinate.hashCode(minx);
-        result = 37 * result + Coordinate.hashCode(maxx);
-        result = 37 * result + Coordinate.hashCode(miny);
-        result = 37 * result + Coordinate.hashCode(maxy);
-        return result;
-    }
-
-  /**
-   * Test the point q to see whether it intersects the Envelope defined by p1-p2
-   * @param p1 one extremal point of the envelope
-   * @param p2 another extremal point of the envelope
-   * @param q the point to test for intersection
-   * @return <code>true</code> if q intersects the envelope p1-p2
-   */
-  public static boolean intersects(Coordinate p1, Coordinate p2, Coordinate q)
-  {
-	//OptimizeIt shows that Math#min and Math#max here are a bottleneck.
-    //Replace with direct comparisons. [Jon Aquino]
-    if (((q.x >= (p1.x < p2.x ? p1.x : p2.x)) && (q.x <= (p1.x > p2.x ? p1.x : p2.x))) &&
-        ((q.y >= (p1.y < p2.y ? p1.y : p2.y)) && (q.y <= (p1.y > p2.y ? p1.y : p2.y)))) {
-      return true;
-    }
-    return false;
-  }
-
-  /**
-   * Test the envelope defined by p1-p2 for intersection
-   * with the envelope defined by q1-q2
-   * @param p1 one extremal point of the envelope P
-   * @param p2 another extremal point of the envelope P
-   * @param q1 one extremal point of the envelope Q
-   * @param q2 another extremal point of the envelope Q
-   * @return <code>true</code> if Q intersects P
-   */
-  public static boolean intersects(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2)
-  {
-    double minq = Math.min(q1.x, q2.x);
-    double maxq = Math.max(q1.x, q2.x);
-    double minp = Math.min(p1.x, p2.x);
-    double maxp = Math.max(p1.x, p2.x);
-
-    if( minp > maxq )
-        return false;
-    if( maxp < minq )
-        return false;
-
-    minq = Math.min(q1.y, q2.y);
-    maxq = Math.max(q1.y, q2.y);
-    minp = Math.min(p1.y, p2.y);
-    maxp = Math.max(p1.y, p2.y);
-
-    if( minp > maxq )
-        return false;
-    if( maxp < minq )
-        return false;
-    return true;
-  }
-
-  /**
-   *  the minimum x-coordinate
-   */
-  private double minx;
-
-  /**
-   *  the maximum x-coordinate
-   */
-  private double maxx;
-
-  /**
-   *  the minimum y-coordinate
-   */
-  private double miny;
-
-  /**
-   *  the maximum y-coordinate
-   */
-  private double maxy;
-
-  /**
-   *  Creates a null <code>Envelope</code>.
-   */
-  public Envelope() {
-    init();
-  }
-
-  /**
-   *  Creates an <code>Envelope</code> for a region defined by maximum and minimum values.
-   *
-   *@param  x1  the first x-value
-   *@param  x2  the second x-value
-   *@param  y1  the first y-value
-   *@param  y2  the second y-value
-   */
-  public Envelope(double x1, double x2, double y1, double y2)
-  {
-    init(x1, x2, y1, y2);
-  }
-
-  /**
-   *  Creates an <code>Envelope</code> for a region defined by two Coordinates.
-   *
-   *@param  p1  the first Coordinate
-   *@param  p2  the second Coordinate
-   */
-  public Envelope(Coordinate p1, Coordinate p2)
-  {
-    init(p1.x, p2.x, p1.y, p2.y);
-  }
-
-  /**
-   *  Create an <code>Envelope</code> from an existing Envelope.
-   *
-   *@param  env  the Envelope to initialize from
-   */
-  public Envelope(Envelope env)
-  {
-    init(env);
-  }
-
-  /**
-   *  Initialize to a null <code>Envelope</code>.
-   */
-  public void init()
-  {
-    setToNull();
-  }
-
-  /**
-   *  Initialize an <code>Envelope</code> for a region defined by maximum and minimum values.
-   *
-   *@param  x1  the first x-value
-   *@param  x2  the second x-value
-   *@param  y1  the first y-value
-   *@param  y2  the second y-value
-   */
-  public void init(double x1, double x2, double y1, double y2)
-  {
-    if (x1 < x2) {
-      minx = x1;
-      maxx = x2;
-    }
-    else {
-      minx = x2;
-      maxx = x1;
-    }
-    if (y1 < y2) {
-      miny = y1;
-      maxy = y2;
-    }
-    else {
-      miny = y2;
-      maxy = y1;
-    }
-  }
-
-  /**
-   *  Initialize an <code>Envelope</code> to a region defined by two Coordinates.
-   *
-   *@param  p1  the first Coordinate
-   *@param  p2  the second Coordinate
-   */
-  public void init(Coordinate p1, Coordinate p2)
-  {
-    init(p1.x, p2.x, p1.y, p2.y);
-  }
-
-  /**
-   *  Initialize an <code>Envelope</code> from an existing Envelope.
-   *
-   *@param  env  the Envelope to initialize from
-   */
-  public void init(Envelope env)
-  {
-    this.minx = env.minx;
-    this.maxx = env.maxx;
-    this.miny = env.miny;
-    this.maxy = env.maxy;
-  }
-
-
-  /**
-   *  Makes this <code>Envelope</code> a "null" envelope, that is, the envelope
-   *  of the empty geometry.
-   */
-  public void setToNull() {
-    minx = 0;
-    maxx = -1;
-    miny = 0;
-    maxy = -1;
-  }
-
-  /**
-   *  Returns <code>true</code> if this <code>Envelope</code> is a "null"
-   *  envelope.
-   *
-   *@return    <code>true</code> if this <code>Envelope</code> is uninitialized
-   *      or is the envelope of the empty geometry.
-   */
-  public boolean isNull() {
-    return maxx < minx;
-  }
-
-  /**
-   *  Returns the difference between the maximum and minimum x values.
-   *
-   *@return    max x - min x, or 0 if this is a null <code>Envelope</code>
-   */
-  public double getWidth() {
-    if (isNull()) {
-      return 0;
-    }
-    return maxx - minx;
-  }
-
-  /**
-   *  Returns the difference between the maximum and minimum y values.
-   *
-   *@return    max y - min y, or 0 if this is a null <code>Envelope</code>
-   */
-  public double getHeight() {
-    if (isNull()) {
-      return 0;
-    }
-    return maxy - miny;
-  }
-
-  /**
-   *  Returns the <code>Envelope</code>s minimum x-value. min x > max x
-   *  indicates that this is a null <code>Envelope</code>.
-   *
-   *@return    the minimum x-coordinate
-   */
-  public double getMinX() {
-    return minx;
-  }
-
-  /**
-   *  Returns the <code>Envelope</code>s maximum x-value. min x > max x
-   *  indicates that this is a null <code>Envelope</code>.
-   *
-   *@return    the maximum x-coordinate
-   */
-  public double getMaxX() {
-    return maxx;
-  }
-
-  /**
-   *  Returns the <code>Envelope</code>s minimum y-value. min y > max y
-   *  indicates that this is a null <code>Envelope</code>.
-   *
-   *@return    the minimum y-coordinate
-   */
-  public double getMinY() {
-    return miny;
-  }
-
-  /**
-   *  Returns the <code>Envelope</code>s maximum y-value. min y > max y
-   *  indicates that this is a null <code>Envelope</code>.
-   *
-   *@return    the maximum y-coordinate
-   */
-  public double getMaxY() {
-    return maxy;
-  }
-
-  /**
-   * Gets the area of this envelope.
-   * 
-   * @return the area of the envelope
-   * @return 0.0 if the envelope is null
-   */
-  public double getArea()
-  {
-    return getWidth() * getHeight();
-  }
-    
-  /**
-   *  Enlarges this <code>Envelope</code> so that it contains
-   *  the given {@link Coordinate}. 
-   *  Has no effect if the point is already on or within the envelope.
-   *
-   *@param  p  the Coordinate to expand to include
-   */
-  public void expandToInclude(Coordinate p)
-  {
-    expandToInclude(p.x, p.y);
-  }
-
-  /**
-   * Expands this envelope by a given distance in all directions.
-   * Both positive and negative distances are supported.
-   *
-   * @param distance the distance to expand the envelope
-   */
-  public void expandBy(double distance)
-  {
-    expandBy(distance, distance);
-  }
-
-  /**
-   * Expands this envelope by a given distance in all directions.
-   * Both positive and negative distances are supported.
-   *
-   * @param deltaX the distance to expand the envelope along the the X axis
-   * @param deltaY the distance to expand the envelope along the the Y axis
-   */
-  public void expandBy(double deltaX, double deltaY)
-  {
-    if (isNull()) return;
-
-    minx -= deltaX;
-    maxx += deltaX;
-    miny -= deltaY;
-    maxy += deltaY;
-
-    // check for envelope disappearing
-    if (minx > maxx || miny > maxy)
-      setToNull();
-  }
-
-  /**
-   *  Enlarges this <code>Envelope</code> so that it contains
-   *  the given point. 
-   *  Has no effect if the point is already on or within the envelope.
-   *
-   *@param  x  the value to lower the minimum x to or to raise the maximum x to
-   *@param  y  the value to lower the minimum y to or to raise the maximum y to
-   */
-  public void expandToInclude(double x, double y) {
-    if (isNull()) {
-      minx = x;
-      maxx = x;
-      miny = y;
-      maxy = y;
-    }
-    else {
-      if (x < minx) {
-        minx = x;
-      }
-      if (x > maxx) {
-        maxx = x;
-      }
-      if (y < miny) {
-        miny = y;
-      }
-      if (y > maxy) {
-        maxy = y;
-      }
-    }
-  }
-
-  /**
-   *  Enlarges this <code>Envelope</code> so that it contains
-   *  the <code>other</code> Envelope. 
-   *  Has no effect if <code>other</code> is wholly on or
-   *  within the envelope.
-   *
-   *@param  other  the <code>Envelope</code> to expand to include
-   */
-  public void expandToInclude(Envelope other) {
-    if (other.isNull()) {
-      return;
-    }
-    if (isNull()) {
-      minx = other.getMinX();
-      maxx = other.getMaxX();
-      miny = other.getMinY();
-      maxy = other.getMaxY();
-    }
-    else {
-      if (other.minx < minx) {
-        minx = other.minx;
-      }
-      if (other.maxx > maxx) {
-        maxx = other.maxx;
-      }
-      if (other.miny < miny) {
-        miny = other.miny;
-      }
-      if (other.maxy > maxy) {
-        maxy = other.maxy;
-      }
-    }
-  }
-
-  /**
-   * Computes the coordinate of the centre of this envelope (as long as it is non-null
-   *
-   * @return the centre coordinate of this envelope
-   * <code>null</code> if the envelope is null
-   */
-  public Coordinate centre() {
-    if (isNull()) return null;
-    return new Coordinate(
-        (getMinX() + getMaxX()) / 2.0,
-        (getMinY() + getMaxY()) / 2.0);
-  }
-
-  /**
-   * Computes the intersection of two {@link Envelope}s.
-   *
-   * @param env the envelope to intersect with
-   * @return a new Envelope representing the intersection of the envelopes (this will be
-   * the null envelope if either argument is null, or they do not intersect
-   */
-  public Envelope intersection(Envelope env)
-  {
-    if (isNull() || env.isNull() || ! intersects(env)) return new Envelope();
-
-    double intMinX = minx > env.minx ? minx : env.minx;
-    double intMinY = miny > env.miny ? miny : env.miny;
-    double intMaxX = maxx < env.maxx ? maxx : env.maxx;
-    double intMaxY = maxy < env.maxy ? maxy : env.maxy;
-    return new Envelope(intMinX, intMaxX, intMinY, intMaxY);
-  }
-
-
-
-  /**
-   *  Check if the region defined by <code>other</code>
-   *  overlaps (intersects) the region of this <code>Envelope</code>.
-   *
-   *@param  other  the <code>Envelope</code> which this <code>Envelope</code> is
-   *          being checked for overlapping
-   *@return        <code>true</code> if the <code>Envelope</code>s overlap
-   */
-  public boolean intersects(Envelope other) {
-      if (isNull() || other.isNull()) { return false; }
-    return !(other.minx > maxx ||
-        other.maxx < minx ||
-        other.miny > maxy ||
-        other.maxy < miny);
-  }
-
-
-  /**
-   *  Check if the point <code>p</code>
-   *  overlaps (lies inside) the region of this <code>Envelope</code>.
-   *
-   *@param  p  the <code>Coordinate</code> to be tested
-   *@return        <code>true</code> if the point overlaps this <code>Envelope</code>
-   */
-  public boolean intersects(Coordinate p) {
-    return intersects(p.x, p.y);
-  }
-
-  /**
-   *  Check if the point <code>(x, y)</code>
-   *  overlaps (lies inside) the region of this <code>Envelope</code>.
-   *
-   *@param  x  the x-ordinate of the point
-   *@param  y  the y-ordinate of the point
-   *@return        <code>true</code> if the point overlaps this <code>Envelope</code>
-   */
-  public boolean intersects(double x, double y) {
-  	if (isNull()) return false;
-    return ! (x > maxx ||
-        x < minx ||
-        y > maxy ||
-        y < miny);
-  }
-
-  /**
-   * Tests if the <code>Envelope other</code>
-   * lies wholely inside this <code>Envelope</code> (inclusive of the boundary).
-   * <p>
-   * Note that this is <b>not</b> the same definition as the SFS <tt>contains</tt>,
-   * which would exclude the envelope boundary.
-   *
-   *@param  other the <code>Envelope</code> to check
-   *@return true if <code>other</code> is contained in this <code>Envelope</code>
-   *
-   *@see #covers(Envelope)
-   */
-  public boolean contains(Envelope other) {
-  	return covers(other);
-  }
-
-  /**
-   * Tests if the given point lies in or on the envelope.
-   * <p>
-   * Note that this is <b>not</b> the same definition as the SFS <tt>contains</tt>,
-   * which would exclude the envelope boundary.
-   *
-   *@param  p  the point which this <code>Envelope</code> is
-   *      being checked for containing
-   *@return    <code>true</code> if the point lies in the interior or
-   *      on the boundary of this <code>Envelope</code>.
-   *      
-   *@see #covers(Coordinate)
-   */
-  public boolean contains(Coordinate p) {
-    return covers(p);
-  }
-
-  /**
-   * Tests if the given point lies in or on the envelope.
-   * <p>
-   * Note that this is <b>not</b> the same definition as the SFS <tt>contains</tt>,
-   * which would exclude the envelope boundary.
-   *
-   *@param  x  the x-coordinate of the point which this <code>Envelope</code> is
-   *      being checked for containing
-   *@param  y  the y-coordinate of the point which this <code>Envelope</code> is
-   *      being checked for containing
-   *@return    <code>true</code> if <code>(x, y)</code> lies in the interior or
-   *      on the boundary of this <code>Envelope</code>.
-   *      
-   *@see #covers(double, double)
-   */
-  public boolean contains(double x, double y) {
-  	return covers(x, y);
-  }
-
-  /**
-   * Tests if the given point lies in or on the envelope.
-   *
-   *@param  x  the x-coordinate of the point which this <code>Envelope</code> is
-   *      being checked for containing
-   *@param  y  the y-coordinate of the point which this <code>Envelope</code> is
-   *      being checked for containing
-   *@return    <code>true</code> if <code>(x, y)</code> lies in the interior or
-   *      on the boundary of this <code>Envelope</code>.
-   */
-  public boolean covers(double x, double y) {
-  	if (isNull()) return false;
-    return x >= minx &&
-        x <= maxx &&
-        y >= miny &&
-        y <= maxy;
-  }
-
-  /**
-   * Tests if the given point lies in or on the envelope.
-   *
-   *@param  p  the point which this <code>Envelope</code> is
-   *      being checked for containing
-   *@return    <code>true</code> if the point lies in the interior or
-   *      on the boundary of this <code>Envelope</code>.
-   */
-  public boolean covers(Coordinate p) {
-    return covers(p.x, p.y);
-  }
-
-  /**
-   * Tests if the <code>Envelope other</code>
-   * lies wholely inside this <code>Envelope</code> (inclusive of the boundary).
-   *
-   *@param  other the <code>Envelope</code> to check
-   *@return true if this <code>Envelope</code> covers the <code>other</code> 
-   */
-  public boolean covers(Envelope other) {
-    if (isNull() || other.isNull()) { return false; }
-    return other.getMinX() >= minx &&
-        other.getMaxX() <= maxx &&
-        other.getMinY() >= miny &&
-        other.getMaxY() <= maxy;
-  }
-
-  /**
-   * Computes the distance between this and another
-   * <code>Envelope</code>.
-   * The distance between overlapping Envelopes is 0.  Otherwise, the
-   * distance is the Euclidean distance between the closest points.
-   */
-  public double distance(Envelope env)
-  {
-    if (intersects(env)) return 0;
-    
-    double dx = 0.0;
-    if (maxx < env.minx) 
-      dx = env.minx - maxx;
-    else if (minx > env.maxx) 
-      dx = minx - env.maxx;
-    
-    double dy = 0.0;
-    if (maxy < env.miny) 
-      dy = env.miny - maxy;
-    else if (miny > env.maxy) dy = miny - env.maxy;
-
-    // if either is zero, the envelopes overlap either vertically or horizontally
-    if (dx == 0.0) return dy;
-    if (dy == 0.0) return dx;
-    return Math.sqrt(dx * dx + dy * dy);
-  }
-
-  public boolean equals(Object other) {
-    if (!(other instanceof Envelope)) {
-      return false;
-    }
-    Envelope otherEnvelope = (Envelope) other;
-    if (isNull()) {
-      return otherEnvelope.isNull();
-    }
-    return maxx == otherEnvelope.getMaxX() &&
-        maxy == otherEnvelope.getMaxY() &&
-        minx == otherEnvelope.getMinX() &&
-        miny == otherEnvelope.getMinY();
-  }
-
-  public String toString()
-  {
-    return "Env[" + minx + " : " + maxx + ", " + miny + " : " + maxy + "]";
-  }
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Geometry.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Geometry.java	(revision 28245)
+++ 	(revision )
@@ -1,1396 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Iterator;
-
-import com.vividsolutions.jts.algorithm.ConvexHull;
-import com.vividsolutions.jts.geom.util.GeometryCollectionMapper;
-import com.vividsolutions.jts.io.WKTWriter;
-import com.vividsolutions.jts.operation.IsSimpleOp;
-import com.vividsolutions.jts.operation.distance.DistanceOp;
-import com.vividsolutions.jts.operation.overlay.OverlayOp;
-import com.vividsolutions.jts.operation.overlay.snap.SnapIfNeededOverlayOp;
-import com.vividsolutions.jts.operation.predicate.RectangleContains;
-import com.vividsolutions.jts.operation.predicate.RectangleIntersects;
-import com.vividsolutions.jts.operation.relate.RelateOp;
-import com.vividsolutions.jts.operation.valid.IsValidOp;
-import com.vividsolutions.jts.util.Assert;
-
-/**
- * A representation of a planar, linear vector geometry.
- * <P>
- *
- *  <H3>Binary Predicates</H3>
- * Because it is not clear at this time
- * what semantics for spatial
- *  analysis methods involving <code>GeometryCollection</code>s would be useful,
- *  <code>GeometryCollection</code>s are not supported as arguments to binary
- *  predicates (other than <code>convexHull</code>) or the <code>relate</code>
- *  method.
- *
- *  <H3>Overlay Methods</H3>
- *
- *  The overlay methods 
- *  return the most specific class possible to represent the result. If the
- *  result is homogeneous, a <code>Point</code>, <code>LineString</code>, or
- *  <code>Polygon</code> will be returned if the result contains a single
- *  element; otherwise, a <code>MultiPoint</code>, <code>MultiLineString</code>,
- *  or <code>MultiPolygon</code> will be returned. If the result is
- *  heterogeneous a <code>GeometryCollection</code> will be returned. <P>
- *
- *  Because it is not clear at this time what semantics for set-theoretic
- *  methods involving <code>GeometryCollection</code>s would be useful,
- * <code>GeometryCollections</code>
- *  are not supported as arguments to the set-theoretic methods.
- *
- *  <H4>Representation of Computed Geometries </H4>
- *
- *  The SFS states that the result
- *  of a set-theoretic method is the "point-set" result of the usual
- *  set-theoretic definition of the operation (SFS 3.2.21.1). However, there are
- *  sometimes many ways of representing a point set as a <code>Geometry</code>.
- *  <P>
- *
- *  The SFS does not specify an unambiguous representation of a given point set
- *  returned from a spatial analysis method. One goal of JTS is to make this
- *  specification precise and unambiguous. JTS will use a canonical form for
- *  <code>Geometry</code>s returned from spatial analysis methods. The canonical
- *  form is a <code>Geometry</code> which is simple and noded:
- *  <UL>
- *    <LI> Simple means that the Geometry returned will be simple according to
- *    the JTS definition of <code>isSimple</code>.
- *    <LI> Noded applies only to overlays involving <code>LineString</code>s. It
- *    means that all intersection points on <code>LineString</code>s will be
- *    present as endpoints of <code>LineString</code>s in the result.
- *  </UL>
- *  This definition implies that non-simple geometries which are arguments to
- *  spatial analysis methods must be subjected to a line-dissolve process to
- *  ensure that the results are simple.
- *
- *  <H4> Constructed Points And The Precision Model </H4>
- *
- *  The results computed by the set-theoretic methods may
- *  contain constructed points which are not present in the input <code>Geometry</code>
- *  s. These new points arise from intersections between line segments in the
- *  edges of the input <code>Geometry</code>s. In the general case it is not
- *  possible to represent constructed points exactly. This is due to the fact
- *  that the coordinates of an intersection point may contain twice as many bits
- *  of precision as the coordinates of the input line segments. In order to
- *  represent these constructed points explicitly, JTS must truncate them to fit
- *  the <code>PrecisionModel</code>. <P>
- *
- *  Unfortunately, truncating coordinates moves them slightly. Line segments
- *  which would not be coincident in the exact result may become coincident in
- *  the truncated representation. This in turn leads to "topology collapses" --
- *  situations where a computed element has a lower dimension than it would in
- *  the exact result. <P>
- *
- *  When JTS detects topology collapses during the computation of spatial
- *  analysis methods, it will throw an exception. If possible the exception will
- *  report the location of the collapse. <P>
- *
- * <h3>Geometry Equality</h3>
- * 
- * JTS provides two ways of comparing geometries for equality: 
- * <b>structural equality</b> and <b>topological equality</b>.
- * 
- * <h4>Structural Equality</h4>
- *
- * Structural Equality is provided by the 
- * {@link #equalsExact(Geometry)} method.  
- * This implements a comparison based on exact, structural pointwise
- * equality. 
- * The {@link #equals(Object)} is a synonym for this method, 
- * to provide structural equality semantics for
- * use in Java collections.
- * It is important to note that structural pointwise equality
- * is easily affected by things like
- * ring order and component order.  In many situations
- * it will be desirable to normalize geometries before
- * comparing them (using the {@link #norm()} 
- * or {@link #normalize()} methods).
- * {@link #equalsNorm(Geometry)} is provided
- * as a convenience method to compute equality over
- * normalized geometries, but it is expensive to use.
- * Finally, {@link #equalsExact(Geometry, double)}
- * allows using a tolerance value for point comparison.
- * 
- * 
- * <h4>Topological Equality</h4>
- * 
- * Topological Equality 
- * implements the SFS definition of point-set equality
- * defined in terms of the DE-9IM matrix.
- * It is is provided by the 
- * {@link #equalsTopo(Geometry)}
- * method.  
- * To support the SFS naming convention, the method
- *  {@link #equals(Geometry)} is also provided as a synonym.  
- *  However, due to the potential for confusion with {@link #equals(Geometry)}
- *  its use is discouraged.
- * <p>
- *  Since #equals(Object) and #hashCode are overridden, 
- *  Geometries can be used effectively in 
- *  Java collections.
- *
- *@version 1.7
- */
-public abstract class Geometry
-    implements Cloneable, Comparable, Serializable
-{
-  private static final long serialVersionUID = 8763622679187376702L;
-    
-  private static Class[] sortedClasses;  
-  
-  private final static GeometryComponentFilter geometryChangedFilter = new GeometryComponentFilter() {
-    public void filter(Geometry geom) {
-      geom.geometryChangedAction();
-    }
-  };
-
-  /**
-   *  The bounding box of this <code>Geometry</code>.
-   */
-  protected Envelope envelope;
-
-  /**
-   * The {@link GeometryFactory} used to create this Geometry
-   */
-  protected final GeometryFactory factory;
-
-  /**
-   * An object reference which can be used to carry ancillary data defined
-   * by the client.
-   */
-  private Object userData = null;
-
-  /**
-   * Creates a new <tt>Geometry</tt> via the specified GeometryFactory.
-   *
-   * @param factory
-   */
-  public Geometry(GeometryFactory factory) {
-    this.factory = factory;
-  }
-
-  /**
-   *  Returns the name of this object's <code>com.vivid.jts.geom</code>
-   *  interface.
-   *
-   *@return    the name of this <code>Geometry</code>s most specific <code>com.vividsolutions.jts.geom</code>
-   *      interface
-   */
-  public abstract String getGeometryType();
-
-  /**
-   *  Returns true if the array contains any non-empty <code>Geometry</code>s.
-   *
-   *@param  geometries  an array of <code>Geometry</code>s; no elements may be
-   *      <code>null</code>
-   *@return             <code>true</code> if any of the <code>Geometry</code>s
-   *      <code>isEmpty</code> methods return <code>false</code>
-   */
-  protected static boolean hasNonEmptyElements(Geometry[] geometries) {
-    for (int i = 0; i < geometries.length; i++) {
-      if (!geometries[i].isEmpty()) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  /**
-   *  Returns true if the array contains any <code>null</code> elements.
-   *
-   *@param  array  an array to validate
-   *@return        <code>true</code> if any of <code>array</code>s elements are
-   *      <code>null</code>
-   */
-  protected static boolean hasNullElements(Object[] array) {
-    for (int i = 0; i < array.length; i++) {
-      if (array[i] == null) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  /**
-   * Gets the factory which contains the context in which this geometry was created.
-   *
-   * @return the factory for this geometry
-   */
-  public GeometryFactory getFactory() {
-         return factory;
-  }
-
-  /**
-   * Gets the user data object for this geometry, if any.
-   *
-   * @return the user data object, or <code>null</code> if none set
-   */
-  public Object getUserData() {
-        return userData;
-  }
-
-  /**
-   * Returns the number of {@link Geometry}s in a {@link GeometryCollection}
-   * (or 1, if the geometry is not a collection).
-   *
-   * @return the number of geometries contained in this geometry
-   */
-  public int getNumGeometries() {
-    return 1;
-  }
-
-  /**
-   * Returns an element {@link Geometry} from a {@link GeometryCollection}
-   * (or <code>this</code>, if the geometry is not a collection).
-   *
-   * @param n the index of the geometry element
-   * @return the n'th geometry contained in this geometry
-   */
-  public Geometry getGeometryN(@SuppressWarnings("unused") int n) {
-    return this;
-  }
-
-
-  /**
-   * A simple scheme for applications to add their own custom data to a Geometry.
-   * An example use might be to add an object representing a Coordinate Reference System.
-   * <p>
-   * Note that user data objects are not present in geometries created by
-   * construction methods.
-   *
-   * @param userData an object, the semantics for which are defined by the
-   * application using this Geometry
-   */
-  public void setUserData(Object userData) {
-        this.userData = userData;
-  }
-
-
-  /**
-   *  Returns the <code>PrecisionModel</code> used by the <code>Geometry</code>.
-   *
-   *@return    the specification of the grid of allowable points, for this
-   *      <code>Geometry</code> and all other <code>Geometry</code>s
-   */
-  public PrecisionModel getPrecisionModel() {
-    return factory.getPrecisionModel();
-  }
-
-  /**
-   *  Returns a vertex of this <code>Geometry</code>
-   *  (usually, but not necessarily, the first one).
-   *  The returned coordinate should not be assumed
-   *  to be an actual Coordinate object used in
-   *  the internal representation.
-   *
-   *@return    a {@link Coordinate} which is a vertex of this <code>Geometry</code>.
-   *@return null if this Geometry is empty
-   */
-  public abstract Coordinate getCoordinate();
-  
-  /**
-   *  Returns an array containing the values of all the vertices for 
-   *  this geometry.
-   *  If the geometry is a composite, the array will contain all the vertices
-   *  for the components, in the order in which the components occur in the geometry.
-   *  <p>
-   *  In general, the array cannot be assumed to be the actual internal 
-   *  storage for the vertices.  Thus modifying the array
-   *  may not modify the geometry itself. 
-   *  Use the {@link CoordinateSequence#setOrdinate} method
-   *  (possibly on the components) to modify the underlying data.
-   *  If the coordinates are modified, 
-   *  {@link #geometryChanged} must be called afterwards.
-   *
-   *@return    the vertices of this <code>Geometry</code>
-   *@see #geometryChanged
-   *@see CoordinateSequence#setOrdinate
-   */
-  public abstract Coordinate[] getCoordinates();
-
-  /**
-   *  Returns the count of this <code>Geometry</code>s vertices. The <code>Geometry</code>
-   *  s contained by composite <code>Geometry</code>s must be
-   *  Geometry's; that is, they must implement <code>getNumPoints</code>
-   *
-   *@return    the number of vertices in this <code>Geometry</code>
-   */
-  public abstract int getNumPoints();
-
-  /**
-   * Tests whether this {@link Geometry} is simple.
-   * In general, the SFS specification of simplicity
-   * follows the rule:
-   *  <UL>
-   *    <LI> A Geometry is simple iff the only self-intersections are at
-   *    boundary points.
-   *  </UL>
-   * Simplicity is defined for each {@link Geometry} subclass as follows:
-   * <ul>
-   * <li>Valid polygonal geometries are simple by definition, so
-   * <code>isSimple</code> trivially returns true.
-   * <li>Linear geometries are simple iff they do not self-intersect at points
-   * other than boundary points.
-   * <li>Zero-dimensional geometries (points) are simple iff they have no
-   * repeated points.
-   * <li>Empty <code>Geometry</code>s are always simple
-   * <ul>
-   *
-   * @return    <code>true</code> if this <code>Geometry</code> has any points of
-   *      self-tangency, self-intersection or other anomalous points
-   * @see #isValid
-   */
-  public boolean isSimple()
-  {
-    checkNotGeometryCollection(this);
-    IsSimpleOp op = new IsSimpleOp(this);
-    return op.isSimple();
-  }
-
-  /**
-   *  Tests the validity of this <code>Geometry</code>.
-   *  Subclasses provide their own definition of "valid".
-   *
-   *@return    <code>true</code> if this <code>Geometry</code> is valid
-   *
-   * @see IsValidOp
-   */
-  public boolean isValid()
-  {
-  	return IsValidOp.isValid(this);
-  }
-
-  /**
-   *  Returns whether or not the set of points in this <code>Geometry</code> is
-   *  empty.
-   *
-   *@return    <code>true</code> if this <code>Geometry</code> equals the empty
-   *      geometry
-   */
-  public abstract boolean isEmpty();
-
-
-  /**
-   * Tests whether the distance from this <code>Geometry</code>
-   * to another is less than or equal to a specified value.
-   *
-   * @param geom the Geometry to check the distance to
-   * @param distance the distance value to compare
-   * @return <code>true</code> if the geometries are less than <code>distance</code> apart.
-   */
-  public boolean isWithinDistance(Geometry geom, double distance)
-  {
-    double envDist = getEnvelopeInternal().distance(geom.getEnvelopeInternal());
-    if (envDist > distance)
-      return false;
-    return DistanceOp.isWithinDistance(this, geom, distance);
-    /*
-    double geomDist = this.distance(geom);
-    if (geomDist > distance)
-      return false;
-    return true;
-    */
-  }
-
-  public boolean isRectangle()
-  {
-    // Polygon overrides to check for actual rectangle
-    return false;
-  }
-
-  /**
-   *  Returns the area of this <code>Geometry</code>.
-   *  Areal Geometries have a non-zero area.
-   *  They override this function to compute the area.
-   *  Others return 0.0
-   *
-   *@return the area of the Geometry
-   */
-  public double getArea()
-  {
-    return 0.0;
-  }
-
-  /**
-   *  Returns the length of this <code>Geometry</code>.
-   *  Linear geometries return their length.
-   *  Areal geometries return their perimeter.
-   *  They override this function to compute the area.
-   *  Others return 0.0
-   *
-   *@return the length of the Geometry
-   */
-  public double getLength()
-  {
-    return 0.0;
-  }
-
-  /**
-   * Returns the dimension of this geometry.
-   * The dimension of a geometry is is the topological 
-   * dimension of its embedding in the 2-D Euclidean plane.
-   * In the JTS spatial model, dimension values are in the set {0,1,2}.
-   * <p>
-   * Note that this is a different concept to the dimension of 
-   * the vertex {@link Coordinate}s.  
-   * The geometry dimension can never be greater than the coordinate dimension.
-   * For example, a 0-dimensional geometry (e.g. a Point) 
-   * may have a coordinate dimension of 3 (X,Y,Z). 
-   *
-   *@return the topological dimension of this geometry.
-   */
-  public abstract int getDimension();
-
-  /**
-   * Returns the boundary, or an empty geometry of appropriate dimension
-   * if this <code>Geometry</code>  is empty.
-   * (In the case of zero-dimensional geometries, '
-   * an empty GeometryCollection is returned.)
-   * For a discussion of this function, see the OpenGIS Simple
-   * Features Specification. As stated in SFS Section 2.1.13.1, "the boundary
-   * of a Geometry is a set of Geometries of the next lower dimension."
-   *
-   *@return    the closure of the combinatorial boundary of this <code>Geometry</code>
-   */
-  public abstract Geometry getBoundary();
-
-  /**
-   *  Returns the dimension of this <code>Geometry</code>s inherent boundary.
-   *
-   *@return    the dimension of the boundary of the class implementing this
-   *      interface, whether or not this object is the empty geometry. Returns
-   *      <code>Dimension.FALSE</code> if the boundary is the empty geometry.
-   */
-  public abstract int getBoundaryDimension();
-
-
-  /**
-   *  Returns the minimum and maximum x and y values in this <code>Geometry</code>
-   *  , or a null <code>Envelope</code> if this <code>Geometry</code> is empty.
-   *
-   *@return    this <code>Geometry</code>s bounding box; if the <code>Geometry</code>
-   *      is empty, <code>Envelope#isNull</code> will return <code>true</code>
-   */
-  public Envelope getEnvelopeInternal() {
-    if (envelope == null) {
-      envelope = computeEnvelopeInternal();
-    }
-    return envelope;
-  }
-
-  /**
-   * Notifies this geometry that its coordinates have been changed by an external
-   * party (for example, via a {@link CoordinateFilter}). 
-   * When this method is called the geometry will flush
-   * and/or update any derived information it has cached (such as its {@link Envelope} ).
-   */
-  public void geometryChanged() {
-    apply(geometryChangedFilter);
-  }
-
-  /**
-   * Notifies this Geometry that its Coordinates have been changed by an external
-   * party. When #geometryChanged is called, this method will be called for
-   * this Geometry and its component Geometries.
-   * @see #apply(GeometryComponentFilter)
-   */
-  protected void geometryChangedAction() {
-    envelope = null;
-  }
-
-  /**
-   * Tests whether this geometry is disjoint from the argument geometry.
-   * <p>
-   * The <code>disjoint</code> predicate has the following equivalent definitions:
-   * <ul>
-   * <li>The two geometries have no point in common
-   * <li>The DE-9IM Intersection Matrix for the two geometries matches 
-   * <code>[FF*FF****]</code>
-   * <li><code>! g.intersects(this) = true</code>
-   * <br>(<code>disjoint</code> is the inverse of <code>intersects</code>)
-   * </ul>
-   *
-   *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return        <code>true</code> if the two <code>Geometry</code>s are
-   *      disjoint
-   *
-   * @see Geometry#intersects
-   */
-  public boolean disjoint(Geometry g) {
-    return ! intersects(g);
-  }
-
-  /**
-   * Tests whether this geometry touches the
-   * argument geometry.
-   * <p>
-   * The <code>touches</code> predicate has the following equivalent definitions:
-   * <ul>
-   * <li>The geometries have at least one point in common, but their interiors do not intersect.
-   * <li>The DE-9IM Intersection Matrix for the two geometries matches
-   * at least one of the following patterns
-   *  <ul>
-   *   <li><code>[FT*******]</code>
-   *   <li><code>[F**T*****]</code>
-   *   <li><code>[F***T****]</code>
-   *  </ul>
-   * </ul>
-   * If both geometries have dimension 0, this predicate returns <code>false</code>.
-   * 
-   *
-   *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return        <code>true</code> if the two <code>Geometry</code>s touch;
-   *      Returns <code>false</code> if both <code>Geometry</code>s are points
-   */
-  public boolean touches(Geometry g) {
-    // short-circuit test
-    if (! getEnvelopeInternal().intersects(g.getEnvelopeInternal()))
-      return false;
-    return relate(g).isTouches(getDimension(), g.getDimension());
-  }
-
-  /**
-   * Tests whether this geometry intersects the argument geometry.
-   * <p>
-   * The <code>intersects</code> predicate has the following equivalent definitions:
-   * <ul>
-   * <li>The two geometries have at least one point in common
-   * <li>The DE-9IM Intersection Matrix for the two geometries matches
-   * at least one of the patterns
-   *  <ul>
-   *   <li><code>[T********]</code>
-   *   <li><code>[*T*******]</code>
-   *   <li><code>[***T*****]</code>
-   *   <li><code>[****T****]</code>
-   *  </ul>
-   * <li><code>! g.disjoint(this) = true</code>
-   * <br>(<code>intersects</code> is the inverse of <code>disjoint</code>)
-   * </ul>
-   *
-   *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return        <code>true</code> if the two <code>Geometry</code>s intersect
-   *
-   * @see Geometry#disjoint
-   */
-  public boolean intersects(Geometry g) {
-
-    // short-circuit envelope test
-    if (! getEnvelopeInternal().intersects(g.getEnvelopeInternal()))
-      return false;
-
-    /**
-     * TODO: (MD) Add optimizations:
-     *
-     * - for P-A case:
-     * If P is in env(A), test for point-in-poly
-     *
-     * - for A-A case:
-     * If env(A1).overlaps(env(A2))
-     * test for overlaps via point-in-poly first (both ways)
-     * Possibly optimize selection of point to test by finding point of A1
-     * closest to centre of env(A2).
-     * (Is there a test where we shouldn't bother - e.g. if env A
-     * is much smaller than env B, maybe there's no point in testing
-     * pt(B) in env(A)?
-     */
-
-    // optimization for rectangle arguments
-    if (isRectangle()) {
-      return RectangleIntersects.intersects((Polygon) this, g);
-    }
-    if (g.isRectangle()) {
-      return RectangleIntersects.intersects((Polygon) g, this);
-    }
-    // general case
-    return relate(g).isIntersects();
-  }
-
-  /**
-   * Tests whether this geometry crosses the
-   * argument geometry.
-   * <p>
-   * The <code>crosses</code> predicate has the following equivalent definitions:
-   * <ul>
-   * <li>The geometries have some but not all interior points in common.
-   * <li>The DE-9IM Intersection Matrix for the two geometries matches
-   * one of the following patterns:
-   *   <ul>
-   *    <li><code>[T*T******]</code> (for P/L, P/A, and L/A situations)
-   *    <li><code>[T*****T**]</code> (for L/P, A/P, and A/L situations)
-   *    <li><code>[0********]</code> (for L/L situations)
-   *   </ul>
-   * </ul>
-   * For any other combination of dimensions this predicate returns <code>false</code>.
-   * <p>
-   * The SFS defined this predicate only for P/L, P/A, L/L, and L/A situations.
-   * In order to make the relation symmetric,
-   * JTS extends the definition to apply to L/P, A/P and A/L situations as well.
-   *
-   *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return        <code>true</code> if the two <code>Geometry</code>s cross.
-   */
-  public boolean crosses(Geometry g) {
-    // short-circuit test
-    if (! getEnvelopeInternal().intersects(g.getEnvelopeInternal()))
-      return false;
-    return relate(g).isCrosses(getDimension(), g.getDimension());
-  }
-
-  /**
-   * Tests whether this geometry is within the
-   * specified geometry.
-   * <p>
-   * The <code>within</code> predicate has the following equivalent definitions:
-   * <ul>
-   * <li>Every point of this geometry is a point of the other geometry,
-   * and the interiors of the two geometries have at least one point in common.
-   * <li>The DE-9IM Intersection Matrix for the two geometries matches 
-   * <code>[T*F**F***]</code>
-   * <li><code>g.contains(this) = true</code>
-   * <br>(<code>within</code> is the converse of {@link #contains})
-   * </ul>
-   * An implication of the definition is that
-   * "The boundary of a Geometry is not within the Geometry".
-   * In other words, if a geometry A is a subset of
-   * the points in the boundary of a geomtry B, <code>A.within(B) = false</code>
-   * (As a concrete example, take A to be a LineString which lies in the boundary of a Polygon B.)
-   * For a predicate with similar behaviour but avoiding 
-   * this subtle limitation, see {@link #coveredBy}.
-   *
-   *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return        <code>true</code> if this <code>Geometry</code> is within
-   *      <code>g</code>
-   *
-   * @see Geometry#contains
-   * @see Geometry#coveredBy
-   */
-  public boolean within(Geometry g) {
-    return g.contains(this);
-  }
-
-  /**
-   * Tests whether this geometry contains the
-   * argument geometry.
-   * <p>
-   * The <code>contains</code> predicate has the following equivalent definitions:
-   * <ul>
-   * <li>Every point of the other geometry is a point of this geometry,
-   * and the interiors of the two geometries have at least one point in common.
-   * <li>The DE-9IM Intersection Matrix for the two geometries matches 
-   * the pattern
-   * <code>[T*****FF*]</code>
-   * <li><code>g.within(this) = true</code>
-   * <br>(<code>contains</code> is the converse of {@link #within} )
-   * </ul>
-   * An implication of the definition is that "Geometries do not
-   * contain their boundary".  In other words, if a geometry A is a subset of
-   * the points in the boundary of a geometry B, <code>B.contains(A) = false</code>.
-   * (As a concrete example, take A to be a LineString which lies in the boundary of a Polygon B.)
-   * For a predicate with similar behaviour but avoiding 
-   * this subtle limitation, see {@link #covers}.
-   *
-   *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return        <code>true</code> if this <code>Geometry</code> contains <code>g</code>
-   *
-   * @see Geometry#within
-   * @see Geometry#covers
-   */
-  public boolean contains(Geometry g) {
-    // short-circuit test
-    if (! getEnvelopeInternal().contains(g.getEnvelopeInternal()))
-      return false;
-    // optimization for rectangle arguments
-    if (isRectangle()) {
-      return RectangleContains.contains((Polygon) this, g);
-    }
-    // general case
-    return relate(g).isContains();
-  }
-
-  /**
-   * Tests whether this geometry overlaps the
-   * specified geometry.
-   * <p>
-   * The <code>overlaps</code> predicate has the following equivalent definitions:
-   * <ul>
-   * <li>The geometries have at least one point each not shared by the other
-   * (or equivalently neither covers the other),
-   * they have the same dimension,
-   * and the intersection of the interiors of the two geometries has
-   * the same dimension as the geometries themselves.
-   * <li>The DE-9IM Intersection Matrix for the two geometries matches
-   *   <code>[T*T***T**]</code> (for two points or two surfaces)
-   *   or <code>[1*T***T**]</code> (for two curves)
-   * </ul>
-   * If the geometries are of different dimension this predicate returns <code>false</code>.
-   *
-   *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return        <code>true</code> if the two <code>Geometry</code>s overlap.
-   */
-  public boolean overlaps(Geometry g) {
-    // short-circuit test
-    if (! getEnvelopeInternal().intersects(g.getEnvelopeInternal()))
-      return false;
-    return relate(g).isOverlaps(getDimension(), g.getDimension());
-  }
-
-  /**
-   * Tests whether this geometry covers the
-   * argument geometry.
-   * <p>
-   * The <code>covers</code> predicate has the following equivalent definitions:
-   * <ul>
-   * <li>Every point of the other geometry is a point of this geometry.
-   * <li>The DE-9IM Intersection Matrix for the two geometries matches
-   * at least one of the following patterns:
-   *  <ul> 
-   *   <li><code>[T*****FF*]</code>
-   *   <li><code>[*T****FF*]</code>
-   *   <li><code>[***T**FF*]</code>
-   *   <li><code>[****T*FF*]</code>
-   *  </ul>
-   * <li><code>g.coveredBy(this) = true</code>
-   * <br>(<code>covers</code> is the converse of {@link #coveredBy})
-   * </ul>
-   * If either geometry is empty, the value of this predicate is <tt>false</tt>.
-   * <p>
-   * This predicate is similar to {@link #contains},
-   * but is more inclusive (i.e. returns <tt>true</tt> for more cases).
-   * In particular, unlike <code>contains</code> it does not distinguish between
-   * points in the boundary and in the interior of geometries.
-   * For most situations, <code>covers</code> should be used in preference to <code>contains</code>.
-   * As an added benefit, <code>covers</code> is more amenable to optimization,
-   * and hence should be more performant.
-   *
-   *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return        <code>true</code> if this <code>Geometry</code> covers <code>g</code>
-   *
-   * @see Geometry#contains
-   * @see Geometry#coveredBy
-   */
-  public boolean covers(Geometry g) {
-    // short-circuit test
-    if (! getEnvelopeInternal().covers(g.getEnvelopeInternal()))
-      return false;
-    // optimization for rectangle arguments
-    if (isRectangle()) {
-    	// since we have already tested that the test envelope is covered
-      return true;
-    }
-    return relate(g).isCovers();
-  }
-
-
-  /**
-   * Tests whether the elements in the DE-9IM
-   * {@link IntersectionMatrix} for the two <code>Geometry</code>s match the elements in <code>intersectionPattern</code>.
-   * The pattern is a 9-character string, with symbols drawn from the following set:
-   *  <UL>
-   *    <LI> 0 (dimension 0)
-   *    <LI> 1 (dimension 1)
-   *    <LI> 2 (dimension 2)
-   *    <LI> T ( matches 0, 1 or 2)
-   *    <LI> F ( matches FALSE)
-   *    <LI> * ( matches any value)
-   *  </UL>
-   *  For more information on the DE-9IM, see the <i>OpenGIS Simple Features
-   *  Specification</i>.
-   *
-   *@param  g                the <code>Geometry</code> with which to compare
-   *      this <code>Geometry</code>
-   *@param  intersectionPattern  the pattern against which to check the
-   *      intersection matrix for the two <code>Geometry</code>s
-   *@return                      <code>true</code> if the DE-9IM intersection
-   *      matrix for the two <code>Geometry</code>s match <code>intersectionPattern</code>
-   * @see IntersectionMatrix
-   */
-  public boolean relate(Geometry g, String intersectionPattern) {
-    return relate(g).matches(intersectionPattern);
-  }
-
-  /**
-   *  Returns the DE-9IM {@link IntersectionMatrix} for the two <code>Geometry</code>s.
-   *
-   *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return        an {@link IntersectionMatrix} describing the intersections of the interiors,
-   *      boundaries and exteriors of the two <code>Geometry</code>s
-   */
-  public IntersectionMatrix relate(Geometry g) {
-    checkNotGeometryCollection(this);
-    checkNotGeometryCollection(g);
-    return RelateOp.relate(this, g);
-  }
-
-  /**
-  * Tests whether this geometry is 
-  * topologically equal to the argument geometry.
-   * <p>
-   * This method is included for backward compatibility reasons.
-   * It has been superseded by the {@link #equalsTopo(Geometry)} method,
-   * which has been named to clearly denote its functionality.
-   * <p>
-   * This method should NOT be confused with the method 
-   * {@link #equals(Object)}, which implements 
-   * an exact equality comparison.
-   *
-   *@param  g  the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return true if the two <code>Geometry</code>s are topologically equal
-   *
-   *@see #equalsTopo(Geometry)
-   */
-  public boolean equals(Geometry g) {
-    return equalsTopo(g);
-  }
-
-  /**
-   * Tests whether this geometry is topologically equal to the argument geometry
-   * as defined by the SFS <tt>equals</tt> predicate.
-   * <p>
-   * The SFS <code>equals</code> predicate has the following equivalent definitions:
-   * <ul>
-   * <li>The two geometries have at least one point in common,
-   * and no point of either geometry lies in the exterior of the other geometry.
-   * <li>The DE-9IM Intersection Matrix for the two geometries matches
-   * the pattern <tt>T*F**FFF*</tt> 
-   * <pre>
-   * T*F
-   * **F
-   * FF*
-   * </pre>
-   * </ul>
-   * <b>Note</b> that this method computes <b>topologically equality</b>. 
-   * For structural equality, see {@link #equalsExact(Geometry)}.
-   *
-   *@param g the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return <code>true</code> if the two <code>Geometry</code>s are topologically equal
-   *
-   *@see #equalsExact(Geometry) 
-   */
-  public boolean equalsTopo(Geometry g)
-  {
-    // short-circuit test
-    if (! getEnvelopeInternal().equals(g.getEnvelopeInternal()))
-      return false;
-    return relate(g).isEquals(getDimension(), g.getDimension());
-  }
-  
-  /**
-   * Tests whether this geometry is structurally and numerically equal
-   * to a given <tt>Object</tt>.
-   * If the argument <tt>Object</tt> is not a <tt>Geometry</tt>, 
-   * the result is <tt>false</tt>.
-   * Otherwise, the result is computed using
-   * {@link #equalsExact(Geometry)}.
-   * <p>
-   * This method is provided to fulfill the Java contract
-   * for value-based object equality. 
-   * In conjunction with {@link #hashCode()} 
-   * it provides semantics which are most useful 
-   * for using
-   * <tt>Geometry</tt>s as keys and values in Java collections.
-   * <p>
-   * Note that to produce the expected result the input geometries
-   * should be in normal form.  It is the caller's 
-   * responsibility to perform this where required
-   * (using {@link Geometry#norm()
-   * or {@link #normalize()} as appropriate).
-   * 
-   * @param o the Object to compare
-   * @return true if this geometry is exactly equal to the argument 
-   * 
-   * @see #equalsExact(Geometry)
-   * @see #hashCode()
-   * @see #norm()
-   * @see #normalize()
-   */
-  public boolean equals(Object o)
-  {
-    if (! (o instanceof Geometry)) return false;
-    Geometry g = (Geometry) o;
-    return equalsExact(g);
-  }
-  
-  public int hashCode()
-  {
-    return getEnvelopeInternal().hashCode();
-  }
-  
-  public String toString() {
-    return toText();
-  }
-
-  /**
-   *  Returns the Well-known Text representation of this <code>Geometry</code>.
-   *  For a definition of the Well-known Text format, see the OpenGIS Simple
-   *  Features Specification.
-   *
-   *@return    the Well-known Text representation of this <code>Geometry</code>
-   */
-  public String toText() {
-    WKTWriter writer = new WKTWriter();
-    return writer.write(this);
-  }
-
-
-
-  /**
-   *  Computes the smallest convex <code>Polygon</code> that contains all the
-   *  points in the <code>Geometry</code>. This obviously applies only to <code>Geometry</code>
-   *  s which contain 3 or more points; the results for degenerate cases are
-   *  specified as follows:
-   *  <TABLE>
-   *    <TR>
-   *      <TH>    Number of <code>Point</code>s in argument <code>Geometry</code>   </TH>
-   *      <TH>    <code>Geometry</code> class of result     </TH>
-   *    </TR>
-   *    <TR>
-   *      <TD>        0      </TD>
-   *      <TD>        empty <code>GeometryCollection</code>      </TD>
-   *    </TR>
-   *    <TR>  <TD>      1     </TD>
-   *      <TD>     <code>Point</code>     </TD>
-   *    </TR>
-   *    <TR>
-   *      <TD>      2     </TD>
-   *      <TD>     <code>LineString</code>     </TD>
-   *    </TR>
-   *    <TR>
-   *      <TD>       3 or more     </TD>
-   *      <TD>      <code>Polygon</code>     </TD>
-   *    </TR>
-   *  </TABLE>
-   *
-   *@return    the minimum-area convex polygon containing this <code>Geometry</code>'
-   *      s points
-   */
-  public Geometry convexHull() {
-    return (new ConvexHull(this)).getConvexHull();
-  }
-
-  /**
-   * Computes a new geometry which has all component coordinate sequences
-   * in reverse order (opposite orientation) to this one.
-   * 
-   * @return a reversed geometry
-   */
-  public abstract Geometry reverse();
-  
-  /**
-   * Computes a <code>Geometry</code> representing the points shared by this
-   * <code>Geometry</code> and <code>other</code>.
-   * <p>
-   * Intersection of {@link GeometryCollection}s is supported
-   * only for homogeneous collection types.
-   * The result is a {@link GeometryCollection} of the
-   * intersection of each element of the target with the argument. 
-   * <p>
-   * The intersection of two geometries of different dimension produces a result
-   * geometry of dimension equal to the minimum dimension of the input
-   * geometries. The result geometry is always a homogeneous
-   * {@link GeometryCollection}.
-   *
-   * @param  other the <code>Geometry</code> with which to compute the intersection
-   * @return the point-set common to the two <code>Geometry</code>s
-   * @throws TopologyException if a robustness error occurs
-   * @throws IllegalArgumentException if the argument is a non-empty heterogeneous GeometryCollection
-   */
-  public Geometry intersection(Geometry other)
-  {
-  	/**
-  	 * TODO: MD - add optimization for P-A case using Point-In-Polygon
-  	 */
-    // special case: if one input is empty ==> empty
-    if (this.isEmpty()) return this.getFactory().createGeometryCollection(null);
-    if (other.isEmpty()) return this.getFactory().createGeometryCollection(null);
-
-    // compute for GCs
-    if (isGeometryCollection(this)) {
-      final Geometry g2 = other;
-      return GeometryCollectionMapper.map(
-          (GeometryCollection) this,
-          new GeometryCollectionMapper.MapOp() {
-        public Geometry map(Geometry g) {
-          return g.intersection(g2);
-        }
-      });
-    }
-//    if (isGeometryCollection(other))
-//      return other.intersection(this);
-    
-    checkNotGeometryCollection(this);
-    checkNotGeometryCollection(other);
-    return SnapIfNeededOverlayOp.overlayOp(this, other, OverlayOp.INTERSECTION);
-  }
-
-  
-  /**
-   * Returns true if the two <code>Geometry</code>s are exactly equal,
-   * up to a specified distance tolerance.
-   * Two Geometries are exactly equal within a distance tolerance
-   * if and only if:
-   * <ul>
-   * <li>they have the same structure
-   * <li>they have the same values for their vertices,
-   * within the given tolerance distance, in exactly the same order.
-   * </ul>
-   * This method does <i>not</i>
-   * test the values of the <tt>GeometryFactory</tt>, the <tt>SRID</tt>, 
-   * or the <tt>userData</tt> fields.
-   * <p>
-   * To properly test equality between different geometries,
-   * it is usually necessary to {@link #normalize()} them first.
-   *
-   * @param other the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   * @param tolerance distance at or below which two <code>Coordinate</code>s
-   *   are considered equal
-   * @return <code>true</code> if this and the other <code>Geometry</code>
-   *   have identical structure and point values, up to the distance tolerance.
-   *   
-   * @see #equalsExact(Geometry)
-   * @see #normalize()
-   * @see #norm()
-   */
-  public abstract boolean equalsExact(Geometry other, double tolerance);
-
-  /**
-   * Returns true if the two <code>Geometry</code>s are exactly equal.
-   * Two Geometries are exactly equal iff:
-   * <ul>
-   * <li>they have the same structure
-   * <li>they have the same values for their vertices,
-   * in exactly the same order.
-   * </ul>
-   * This provides a stricter test of equality than
-   * {@link #equalsTopo(Geometry)}, which is more useful
-   * in certain situations
-   * (such as using geometries as keys in collections).
-   * <p>
-   * This method does <i>not</i>
-   * test the values of the <tt>GeometryFactory</tt>, the <tt>SRID</tt>, 
-   * or the <tt>userData</tt> fields.
-   * <p>
-   * To properly test equality between different geometries,
-   * it is usually necessary to {@link #normalize()} them first.
-   *
-   *@param  other  the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return <code>true</code> if this and the other <code>Geometry</code>
-   *      have identical structure and point values.
-   *      
-   * @see #equalsExact(Geometry, double)
-   * @see #normalize()
-   * @see #norm()
-   */
-  public boolean equalsExact(Geometry other) { return equalsExact(other, 0); }
-
-
-  /**
-   *  Performs an operation with or on this <code>Geometry</code>'s
-   *  coordinates. 
-   *  If this method modifies any coordinate values,
-   *  {@link #geometryChanged} must be called to update the geometry state. 
-   *  Note that you cannot use this method to
-   *  modify this Geometry if its underlying CoordinateSequence's #get method
-   *  returns a copy of the Coordinate, rather than the actual Coordinate stored
-   *  (if it even stores Coordinate objects at all).
-   *
-   *@param  filter  the filter to apply to this <code>Geometry</code>'s
-   *      coordinates
-   */
-  public abstract void apply(CoordinateFilter filter);
-
-  /**
-   *  Performs an operation on the coordinates in this <code>Geometry</code>'s
-   *  {@link CoordinateSequence}s. 
-   *  If the filter reports that a coordinate value has been changed, 
-   *  {@link #geometryChanged} will be called automatically.
-   *
-   *@param  filter  the filter to apply
-   */
-  public abstract void apply(CoordinateSequenceFilter filter);
-
-  /**
-   *  Performs an operation with or on this <code>Geometry</code> and its
-   *  subelement <code>Geometry</code>s (if any).
-   *  Only GeometryCollections and subclasses
-   *  have subelement Geometry's.
-   *
-   *@param  filter  the filter to apply to this <code>Geometry</code> (and
-   *      its children, if it is a <code>GeometryCollection</code>).
-   */
-  public abstract void apply(GeometryFilter filter);
-
-  /**
-   *  Performs an operation with or on this Geometry and its
-   *  component Geometry's.  Only GeometryCollections and
-   *  Polygons have component Geometry's; for Polygons they are the LinearRings
-   *  of the shell and holes.
-   *
-   *@param  filter  the filter to apply to this <code>Geometry</code>.
-   */
-  public abstract void apply(GeometryComponentFilter filter);
-
-  /**
-   * Creates and returns a full copy of this {@link Geometry} object
-   * (including all coordinates contained by it).
-   * Subclasses are responsible for overriding this method and copying
-   * their internal data.  Overrides should call this method first.
-   *
-   * @return a clone of this instance
-   */
-  public Object clone() {
-    try {
-      Geometry clone = (Geometry) super.clone();
-      if (clone.envelope != null) { clone.envelope = new Envelope(clone.envelope); }
-      return clone;
-    }
-    catch (CloneNotSupportedException e) {
-      Assert.shouldNeverReachHere();
-      return null;
-    }
-  }
-
-  /**
-   *  Converts this <code>Geometry</code> to <b>normal form</b> (or <b>
-   *  canonical form</b> ). Normal form is a unique representation for <code>Geometry</code>
-   *  s. It can be used to test whether two <code>Geometry</code>s are equal
-   *  in a way that is independent of the ordering of the coordinates within
-   *  them. Normal form equality is a stronger condition than topological
-   *  equality, but weaker than pointwise equality. The definitions for normal
-   *  form use the standard lexicographical ordering for coordinates. "Sorted in
-   *  order of coordinates" means the obvious extension of this ordering to
-   *  sequences of coordinates.
-   *  <p>
-   *  NOTE that this method mutates the value of this geometry in-place.
-   *  If this is not safe and/or wanted, the geometry should be
-   *  cloned prior to normalization.
-   */
-  public abstract void normalize();
-
-  
-  /**
-   *  Returns whether this <code>Geometry</code> is greater than, equal to,
-   *  or less than another <code>Geometry</code>. <P>
-   *
-   *  If their classes are different, they are compared using the following
-   *  ordering:
-   *  <UL>
-   *    <LI> Point (lowest)
-   *    <LI> MultiPoint
-   *    <LI> LineString
-   *    <LI> LinearRing
-   *    <LI> MultiLineString
-   *    <LI> Polygon
-   *    <LI> MultiPolygon
-   *    <LI> GeometryCollection (highest)
-   *  </UL>
-   *  If the two <code>Geometry</code>s have the same class, their first
-   *  elements are compared. If those are the same, the second elements are
-   *  compared, etc.
-   *
-   *@param  o  a <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *@return    a positive number, 0, or a negative number, depending on whether
-   *      this object is greater than, equal to, or less than <code>o</code>, as
-   *      defined in "Normal Form For Geometry" in the JTS Technical
-   *      Specifications
-   */
-  public int compareTo(Object o) {
-    Geometry other = (Geometry) o;
-    if (getClassSortIndex() != other.getClassSortIndex()) {
-      return getClassSortIndex() - other.getClassSortIndex();
-    }
-    if (isEmpty() && other.isEmpty()) {
-      return 0;
-    }
-    if (isEmpty()) {
-      return -1;
-    }
-    if (other.isEmpty()) {
-      return 1;
-    }
-    return compareToSameClass(o);
-  }
-
-
-  /**
-   *  Returns whether the two <code>Geometry</code>s are equal, from the point
-   *  of view of the <code>equalsExact</code> method. Called by <code>equalsExact</code>
-   *  . In general, two <code>Geometry</code> classes are considered to be
-   *  "equivalent" only if they are the same class. An exception is <code>LineString</code>
-   *  , which is considered to be equivalent to its subclasses.
-   *
-   *@param  other  the <code>Geometry</code> with which to compare this <code>Geometry</code>
-   *      for equality
-   *@return        <code>true</code> if the classes of the two <code>Geometry</code>
-   *      s are considered to be equal by the <code>equalsExact</code> method.
-   */
-  protected boolean isEquivalentClass(Geometry other) {
-    return this.getClass().getName().equals(other.getClass().getName());
-  }
-
-  /**
-   *  Throws an exception if <code>g</code>'s class is <code>GeometryCollection</code>
-   *  . (Its subclasses do not trigger an exception).
-   *
-   *@param  g                          the <code>Geometry</code> to check
-   *@throws  IllegalArgumentException  if <code>g</code> is a <code>GeometryCollection</code>
-   *      but not one of its subclasses
-   */
-  protected void checkNotGeometryCollection(Geometry g) {
-    //Don't use instanceof because we want to allow subclasses
-    if (g.getClass().getName().equals("com.vividsolutions.jts.geom.GeometryCollection")) {
-      throw new IllegalArgumentException("This method does not support GeometryCollection arguments");
-    }
-  }
-
-  protected boolean isGeometryCollection(Geometry g)
-  {
-    return g.getClass().equals(com.vividsolutions.jts.geom.GeometryCollection.class);
-  }
-
-  /**
-   *  Returns the minimum and maximum x and y values in this <code>Geometry</code>
-   *  , or a null <code>Envelope</code> if this <code>Geometry</code> is empty.
-   *  Unlike <code>getEnvelopeInternal</code>, this method calculates the <code>Envelope</code>
-   *  each time it is called; <code>getEnvelopeInternal</code> caches the result
-   *  of this method.
-   *
-   *@return    this <code>Geometry</code>s bounding box; if the <code>Geometry</code>
-   *      is empty, <code>Envelope#isNull</code> will return <code>true</code>
-   */
-  protected abstract Envelope computeEnvelopeInternal();
-
-  /**
-   *  Returns whether this <code>Geometry</code> is greater than, equal to,
-   *  or less than another <code>Geometry</code> having the same class.
-   *
-   *@param  o  a <code>Geometry</code> having the same class as this <code>Geometry</code>
-   *@return    a positive number, 0, or a negative number, depending on whether
-   *      this object is greater than, equal to, or less than <code>o</code>, as
-   *      defined in "Normal Form For Geometry" in the JTS Technical
-   *      Specifications
-   */
-  protected abstract int compareToSameClass(Object o);
-
-  /**
-   *  Returns whether this <code>Geometry</code> is greater than, equal to,
-   *  or less than another <code>Geometry</code> of the same class.
-   * using the given {@link CoordinateSequenceComparator}.
-   *
-   *@param  o  a <code>Geometry</code> having the same class as this <code>Geometry</code>
-   *@param comp a <code>CoordinateSequenceComparator</code>
-   *@return    a positive number, 0, or a negative number, depending on whether
-   *      this object is greater than, equal to, or less than <code>o</code>, as
-   *      defined in "Normal Form For Geometry" in the JTS Technical
-   *      Specifications
-   */
-  protected abstract int compareToSameClass(Object o, CoordinateSequenceComparator comp);
-
-  /**
-   *  Returns the first non-zero result of <code>compareTo</code> encountered as
-   *  the two <code>Collection</code>s are iterated over. If, by the time one of
-   *  the iterations is complete, no non-zero result has been encountered,
-   *  returns 0 if the other iteration is also complete. If <code>b</code>
-   *  completes before <code>a</code>, a positive number is returned; if a
-   *  before b, a negative number.
-   *
-   *@param  a  a <code>Collection</code> of <code>Comparable</code>s
-   *@param  b  a <code>Collection</code> of <code>Comparable</code>s
-   *@return    the first non-zero <code>compareTo</code> result, if any;
-   *      otherwise, zero
-   */
-  protected int compare(Collection a, Collection b) {
-    Iterator i = a.iterator();
-    Iterator j = b.iterator();
-    while (i.hasNext() && j.hasNext()) {
-      Comparable aElement = (Comparable) i.next();
-      Comparable bElement = (Comparable) j.next();
-      int comparison = aElement.compareTo(bElement);
-      if (comparison != 0) {
-        return comparison;
-      }
-    }
-    if (i.hasNext()) {
-      return 1;
-    }
-    if (j.hasNext()) {
-      return -1;
-    }
-    return 0;
-  }
-
-  protected boolean equal(Coordinate a, Coordinate b, double tolerance) {
-    if (tolerance == 0) { return a.equals(b); }
-    return a.distance(b) <= tolerance;
-  }
-
-  private int getClassSortIndex() {
-		if (sortedClasses == null)
-			initSortedClasses();
-
-		for (int i = 0; i < sortedClasses.length; i++) {
-			if (sortedClasses[i].isInstance(this))
-				return i;
-		}
-		Assert.shouldNeverReachHere("Class not supported: " + this.getClass());
-		return -1;
-	}
-
-  private static void initSortedClasses()
-  {
-		sortedClasses = new Class[] { 
-					Point.class, 
-					MultiPoint.class,
-					LineString.class, 
-					LinearRing.class, 
-					MultiLineString.class,
-					Polygon.class, 
-					MultiPolygon.class, 
-					GeometryCollection.class };
-  }
-  
-  private Point createPointFromInternalCoord(Coordinate coord, Geometry exemplar)
-  {
-    exemplar.getPrecisionModel().makePrecise(coord);
-    return exemplar.getFactory().createPoint(coord);
-  }
-
-
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/GeometryCollection.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/GeometryCollection.java	(revision 28245)
+++ 	(revision )
@@ -1,298 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.util.Arrays;
-import java.util.TreeSet;
-
-import com.vividsolutions.jts.util.Assert;
-
-/**
- * Models a collection of {@link Geometry}s of
- * arbitrary type and dimension.
- * 
- *
- *@version 1.7
- */
-public class GeometryCollection extends Geometry {
-//  With contributions from Markus Schaber [schabios@logi-track.com] 2004-03-26
-  private static final long serialVersionUID = -5694727726395021467L;
-  /**
-   *  Internal representation of this <code>GeometryCollection</code>.
-   */
-  protected Geometry[] geometries;
-
-
-  /**
-   * @param geometries
-   *            the <code>Geometry</code>s for this <code>GeometryCollection</code>,
-   *            or <code>null</code> or an empty array to create the empty
-   *            geometry. Elements may be empty <code>Geometry</code>s,
-   *            but not <code>null</code>s.
-   */
-  public GeometryCollection(Geometry[] geometries, GeometryFactory factory) {
-    super(factory);
-    if (geometries == null) {
-      geometries = new Geometry[]{};
-    }
-    if (hasNullElements(geometries)) {
-      throw new IllegalArgumentException("geometries must not contain null elements");
-    }
-    this.geometries = geometries;
-  }
-
-  public Coordinate getCoordinate() {
-    if (isEmpty()) return null;
-    return geometries[0].getCoordinate();
-  }
-
-  /**
-   * Collects all coordinates of all subgeometries into an Array.
-   *
-   * Note that while changes to the coordinate objects themselves
-   * may modify the Geometries in place, the returned Array as such
-   * is only a temporary container which is not synchronized back.
-   *
-   * @return the collected coordinates
-   *    */
-  public Coordinate[] getCoordinates() {
-    Coordinate[] coordinates = new Coordinate[getNumPoints()];
-    int k = -1;
-    for (int i = 0; i < geometries.length; i++) {
-      Coordinate[] childCoordinates = geometries[i].getCoordinates();
-      for (int j = 0; j < childCoordinates.length; j++) {
-        k++;
-        coordinates[k] = childCoordinates[j];
-      }
-    }
-    return coordinates;
-  }
-
-  public boolean isEmpty() {
-    for (int i = 0; i < geometries.length; i++) {
-      if (!geometries[i].isEmpty()) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  public int getDimension() {
-    int dimension = Dimension.FALSE;
-    for (int i = 0; i < geometries.length; i++) {
-      dimension = Math.max(dimension, geometries[i].getDimension());
-    }
-    return dimension;
-  }
-
-  public int getBoundaryDimension() {
-    int dimension = Dimension.FALSE;
-    for (int i = 0; i < geometries.length; i++) {
-      dimension = Math.max(dimension, geometries[i].getBoundaryDimension());
-    }
-    return dimension;
-  }
-
-  public int getNumGeometries() {
-    return geometries.length;
-  }
-
-  public Geometry getGeometryN(int n) {
-    return geometries[n];
-  }
-
-  public int getNumPoints() {
-    int numPoints = 0;
-    for (int i = 0; i < geometries.length; i++) {
-      numPoints += geometries[i].getNumPoints();
-    }
-    return numPoints;
-  }
-
-  public String getGeometryType() {
-    return "GeometryCollection";
-  }
-
-  public Geometry getBoundary() {
-    checkNotGeometryCollection(this);
-    Assert.shouldNeverReachHere();
-    return null;
-  }
-
-  /**
-   *  Returns the area of this <code>GeometryCollection</code>
-   *
-   * @return the area of the polygon
-   */
-  public double getArea()
-  {
-    double area = 0.0;
-    for (int i = 0; i < geometries.length; i++) {
-      area += geometries[i].getArea();
-    }
-    return area;
-  }
-
-  public double getLength()
-  {
-    double sum = 0.0;
-    for (int i = 0; i < geometries.length; i++) {
-      sum += (geometries[i]).getLength();
-    }
-    return sum;
-  }
-
-  public boolean equalsExact(Geometry other, double tolerance) {
-    if (!isEquivalentClass(other)) {
-      return false;
-    }
-    GeometryCollection otherCollection = (GeometryCollection) other;
-    if (geometries.length != otherCollection.geometries.length) {
-      return false;
-    }
-    for (int i = 0; i < geometries.length; i++) {
-      if (!geometries[i].equalsExact(otherCollection.geometries[i], tolerance)) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  public void apply(CoordinateFilter filter) {
-	    for (int i = 0; i < geometries.length; i++) {
-	      geometries[i].apply(filter);
-	    }
-	  }
-
-  public void apply(CoordinateSequenceFilter filter) {
-    if (geometries.length == 0)
-      return;
-    for (int i = 0; i < geometries.length; i++) {
-      geometries[i].apply(filter);
-      if (filter.isDone()) {
-        break;
-      }
-    }
-    if (filter.isGeometryChanged())
-      geometryChanged();
-  }
-
-  public void apply(GeometryFilter filter) {
-    filter.filter(this);
-    for (int i = 0; i < geometries.length; i++) {
-      geometries[i].apply(filter);
-    }
-  }
-
-  public void apply(GeometryComponentFilter filter) {
-    filter.filter(this);
-    for (int i = 0; i < geometries.length; i++) {
-      geometries[i].apply(filter);
-    }
-  }
-
-  /**
-   * Creates and returns a full copy of this {@link GeometryCollection} object.
-   * (including all coordinates contained by it).
-   *
-   * @return a clone of this instance
-   */
-  public Object clone() {
-    GeometryCollection gc = (GeometryCollection) super.clone();
-    gc.geometries = new Geometry[geometries.length];
-    for (int i = 0; i < geometries.length; i++) {
-      gc.geometries[i] = (Geometry) geometries[i].clone();
-    }
-    return gc;// return the clone
-  }
-
-  public void normalize() {
-    for (int i = 0; i < geometries.length; i++) {
-      geometries[i].normalize();
-    }
-    Arrays.sort(geometries);
-  }
-
-  protected Envelope computeEnvelopeInternal() {
-    Envelope envelope = new Envelope();
-    for (int i = 0; i < geometries.length; i++) {
-      envelope.expandToInclude(geometries[i].getEnvelopeInternal());
-    }
-    return envelope;
-  }
-
-  protected int compareToSameClass(Object o) {
-    TreeSet<Geometry> theseElements = new TreeSet<Geometry>(Arrays.asList(geometries));
-    TreeSet<Geometry> otherElements = new TreeSet<Geometry>(Arrays.asList(((GeometryCollection) o).geometries));
-    return compare(theseElements, otherElements);
-  }
-
-  protected int compareToSameClass(Object o, CoordinateSequenceComparator comp) {
-    GeometryCollection gc = (GeometryCollection) o;
-
-    int n1 = getNumGeometries();
-    int n2 = gc.getNumGeometries();
-    int i = 0;
-    while (i < n1 && i < n2) {
-      Geometry thisGeom = getGeometryN(i);
-      Geometry otherGeom = gc.getGeometryN(i);
-      int holeComp = thisGeom.compareToSameClass(otherGeom, comp);
-      if (holeComp != 0) return holeComp;
-      i++;
-    }
-    if (i < n1) return 1;
-    if (i < n2) return -1;
-    return 0;
-
-  }
-  
-  /**
-   * Creates a {@link GeometryCollection} with
-   * every component reversed.
-   * The order of the components in the collection are not reversed.
-   *
-   * @return a {@link GeometryCollection} in the reverse order
-   */
-  public Geometry reverse()
-  {
-    int n = geometries.length;
-    Geometry[] revGeoms = new Geometry[n];
-    for (int i = 0; i < geometries.length; i++) {
-      revGeoms[i] = geometries[i].reverse();
-    }
-    return getFactory().createGeometryCollection(revGeoms);
-  }
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/GeometryCollectionIterator.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/GeometryCollectionIterator.java	(revision 28245)
+++ 	(revision )
@@ -1,153 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- *  Iterates over all {@link Geometry}s in a {@link Geometry},
- *  (which may be either a collection or an atomic geometry).
- *  The iteration sequence follows a pre-order, depth-first traversal of the 
- *  structure of the <code>GeometryCollection</code>
- *  (which may be nested). The original <code>Geometry</code> object is
- *  returned as well (as the first object), as are all sub-collections and atomic elements. 
- *  It is  simple to ignore the intermediate <code>GeometryCollection</code> objects if they are not
- *  needed.
- *
- *@version 1.7
- */
-public class GeometryCollectionIterator implements Iterator {
-
-  /**
-   *  The <code>Geometry</code> being iterated over.
-   */
-  private Geometry parent;
-  /**
-   *  Indicates whether or not the first element 
-   *  (the root <code>GeometryCollection</code>) has been returned.
-   */
-  private boolean atStart;
-  /**
-   *  The number of <code>Geometry</code>s in the the <code>GeometryCollection</code>.
-   */
-  private int max;
-  /**
-   *  The index of the <code>Geometry</code> that will be returned when <code>next</code>
-   *  is called.
-   */
-  private int index;
-  /**
-   *  The iterator over a nested <code>Geometry</code>, or <code>null</code>
-   *  if this <code>GeometryCollectionIterator</code> is not currently iterating
-   *  over a nested <code>GeometryCollection</code>.
-   */
-  private GeometryCollectionIterator subcollectionIterator;
-
-  /**
-   *  Constructs an iterator over the given <code>Geometry</code>.
-   *
-   *@param  parent  the geometry over which to iterate; also, the first
-   *      element returned by the iterator.
-   */
-  public GeometryCollectionIterator(Geometry parent) {
-    this.parent = parent;
-    atStart = true;
-    index = 0;
-    max = parent.getNumGeometries();
-  }
-
-  /**
-   * Tests whether any geometry elements remain to be returned.
-   * 
-   * @return true if more geometry elements remain
-   */
-  public boolean hasNext() {
-    if (atStart) {
-      return true;
-    }
-    if (subcollectionIterator != null) {
-      if (subcollectionIterator.hasNext()) {
-        return true;
-      }
-      subcollectionIterator = null;
-    }
-    if (index >= max) {
-      return false;
-    }
-    return true;
-  }
-
-  /**
-   * Gets the next geometry in the iteration sequence.
-   * 
-   * @return the next geometry in the iteration
-   */
-  public Object next() {
-    // the parent GeometryCollection is the first object returned
-    if (atStart) {
-      atStart = false;
-      return parent;
-    }
-    if (subcollectionIterator != null) {
-      if (subcollectionIterator.hasNext()) {
-        return subcollectionIterator.next();
-      }
-      else {
-        subcollectionIterator = null;
-      }
-    }
-    if (index >= max) {
-      throw new NoSuchElementException();
-    }
-    Geometry obj = parent.getGeometryN(index++);
-    if (obj instanceof GeometryCollection) {
-      subcollectionIterator = new GeometryCollectionIterator(obj);
-      // there will always be at least one element in the sub-collection
-      return subcollectionIterator.next();
-    }
-    return obj;
-  }
-
-  /**
-   * Removal is not supported.
-   *
-   * @throws  UnsupportedOperationException  This method is not implemented.
-   */
-  public void remove() {
-    throw new UnsupportedOperationException(getClass().getName());
-  }
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/GeometryComponentFilter.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/GeometryComponentFilter.java	(revision 28245)
+++ 	(revision )
@@ -1,68 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-
-/**
- *  <code>Geometry</code> classes support the concept of applying
- *  a <code>GeometryComponentFilter</code>
- *  filter to the <code>Geometry</code>.
- *  The filter is applied to every component of the <code>Geometry</code>
- *  which is itself a <code>Geometry</code>
- *  and which does not itself contain any components.
- * (For instance, all the {@link LinearRing}s in {@link Polygon}s are visited,
- * but in a {@link MultiPolygon} the {@link Polygon}s themselves are not visited.)
- * Thus the only classes of Geometry which must be 
- * handled as arguments to {@link #filter}
- * are {@link LineString}s, {@link LinearRing}s and {@link Point}s.
- *  <p>
- *  A <code>GeometryComponentFilter</code> filter can either
- *  record information about the <code>Geometry</code>
- *  or change the <code>Geometry</code> in some way.
- *  <code>GeometryComponentFilter</code>
- *  is an example of the Gang-of-Four Visitor pattern.
- *
- *@version 1.7
- */
-public interface GeometryComponentFilter {
-
-  /**
-   *  Performs an operation with or on <code>geom</code>.
-   *
-   *@param  geom  a <code>Geometry</code> to which the filter is applied.
-   */
-  void filter(Geometry geom);
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/GeometryFactory.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/GeometryFactory.java	(revision 28245)
+++ 	(revision )
@@ -1,392 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Iterator;
-
-import com.vividsolutions.jts.geom.impl.CoordinateArraySequenceFactory;
-import com.vividsolutions.jts.util.Assert;
-
-/**
- * Supplies a set of utility methods for building Geometry objects from lists
- * of Coordinates.
- * <p>
- * Note that the factory constructor methods do <b>not</b> change the input coordinates in any way.
- * In particular, they are not rounded to the supplied <tt>PrecisionModel</tt>.
- * It is assumed that input Coordinates meet the given precision.
- *
- *
- * @version 1.7
- */
-public class GeometryFactory
-    implements Serializable
-{
-  private static final long serialVersionUID = -6820524753094095635L;
-  private PrecisionModel precisionModel;
-
-  private CoordinateSequenceFactory coordinateSequenceFactory;
-
-  /**
-   * Constructs a GeometryFactory that generates Geometries having the given
-   * PrecisionModel, spatial-reference ID, and CoordinateSequence implementation.
-   */
-  public GeometryFactory(PrecisionModel precisionModel, int SRID,
-                         CoordinateSequenceFactory coordinateSequenceFactory) {
-      this.precisionModel = precisionModel;
-      this.coordinateSequenceFactory = coordinateSequenceFactory;
-  }
-
-  /**
-   * Constructs a GeometryFactory that generates Geometries having the given
-   * CoordinateSequence implementation, a double-precision floating PrecisionModel and a
-   * spatial-reference ID of 0.
-   */
-  public GeometryFactory(CoordinateSequenceFactory coordinateSequenceFactory) {
-    this(new PrecisionModel(), 0, coordinateSequenceFactory);
-  }
-
-  /**
-   * Constructs a GeometryFactory that generates Geometries having the given
-   * {@link PrecisionModel} and spatial-reference ID, and the default CoordinateSequence
-   * implementation.
-   *
-   * @param precisionModel the PrecisionModel to use
-   * @param SRID the SRID to use
-   */
-  public GeometryFactory(PrecisionModel precisionModel, int SRID) {
-    this(precisionModel, SRID, getDefaultCoordinateSequenceFactory());
-  }
-
-  /**
-   * Constructs a GeometryFactory that generates Geometries having a floating
-   * PrecisionModel and a spatial-reference ID of 0.
-   */
-  public GeometryFactory() {
-    this(new PrecisionModel(), 0);
-  }
-
-  private static CoordinateSequenceFactory getDefaultCoordinateSequenceFactory()
-  {
-    return CoordinateArraySequenceFactory.instance();
-  }
-
-  /**
-   *  Converts the <code>List</code> to an array.
-   *
-   *@param  points  the <code>List</code> of Points to convert
-   *@return         the <code>List</code> in array format
-   */
-  public static Point[] toPointArray(Collection<? extends Geometry> points) {
-    Point[] pointArray = new Point[points.size()];
-    return points.toArray(pointArray);
-  }
-
-  /**
-   *  Converts the <code>List</code> to an array.
-   *
-   *@param  geometries  the list of <code>Geometry's</code> to convert
-   *@return            the <code>List</code> in array format
-   */
-  public static Geometry[] toGeometryArray(Collection<? extends Geometry> geometries) {
-    if (geometries == null) return null;
-    Geometry[] geometryArray = new Geometry[geometries.size()];
-    return geometries.toArray(geometryArray);
-  }
-
-  /**
-   *  Converts the <code>List</code> to an array.
-   *
-   *@param  lineStrings  the <code>List</code> of LineStrings to convert
-   *@return              the <code>List</code> in array format
-   */
-  public static LineString[] toLineStringArray(Collection<? extends Geometry> lineStrings) {
-    LineString[] lineStringArray = new LineString[lineStrings.size()];
-    return lineStrings.toArray(lineStringArray);
-  }
-
-  /**
-   *  Converts the <code>List</code> to an array.
-   *
-   *@param  polygons  the <code>List</code> of Polygons to convert
-   *@return           the <code>List</code> in array format
-   */
-  public static Polygon[] toPolygonArray(Collection<? extends Geometry> polygons) {
-    Polygon[] polygonArray = new Polygon[polygons.size()];
-    return polygons.toArray(polygonArray);
-  }
-
-
-  /**
-   * Returns the PrecisionModel that Geometries created by this factory
-   * will be associated with.
-   */
-  public PrecisionModel getPrecisionModel() {
-    return precisionModel;
-  }
-
-  /**
-   * Creates a Point using the given Coordinate; a null Coordinate will create
-   * an empty Geometry.
-   */
-  public Point createPoint(Coordinate coordinate) {
-    return createPoint(coordinate != null ? getCoordinateSequenceFactory().create(new Coordinate[]{coordinate}) : null);
-  }
-
-  /**
-   * Creates a Point using the given CoordinateSequence; a null or empty
-   * CoordinateSequence will create an empty Point.
-   */
-  public Point createPoint(CoordinateSequence coordinates) {
-  	return new Point(coordinates, this);
-  }
-
-  /**
-   * Creates a MultiLineString using the given LineStrings; a null or empty
-   * array will create an empty MultiLineString.
-   * @param lineStrings LineStrings, each of which may be empty but not null
-   */
-  public MultiLineString createMultiLineString(LineString[] lineStrings) {
-  	return new MultiLineString(lineStrings, this);
-  }
-
-  /**
-   * Creates a GeometryCollection using the given Geometries; a null or empty
-   * array will create an empty GeometryCollection.
-   * @param geometries Geometries, each of which may be empty but not null
-   */
-  public GeometryCollection createGeometryCollection(Geometry[] geometries) {
-  	return new GeometryCollection(geometries, this);
-  }
-
-  /**
-   * Creates a MultiPolygon using the given Polygons; a null or empty array
-   * will create an empty Polygon. The polygons must conform to the
-   * assertions specified in the <A
-   * HREF="http://www.opengis.org/techno/specs.htm">OpenGIS Simple Features
-   * Specification for SQL</A>.
-   *
-   * @param polygons
-   *            Polygons, each of which may be empty but not null
-   */
-  public MultiPolygon createMultiPolygon(Polygon[] polygons) {
-    return new MultiPolygon(polygons, this);
-  }
-
-  /**
-   * Creates a {@link LinearRing} using the given {@link Coordinate}s.
-   * A null or empty array will
-   * create an empty LinearRing. The points must form a closed and simple
-   * linestring. Consecutive points must not be equal.
-   * @param coordinates an array without null elements, or an empty array, or null
-   */
-  public LinearRing createLinearRing(Coordinate[] coordinates) {
-    return createLinearRing(coordinates != null ? getCoordinateSequenceFactory().create(coordinates) : null);
-  }
-
-  /**
-   * Creates a {@link LinearRing} using the given {@link CoordinateSequence}. 
-   * A null or empty CoordinateSequence will
-   * create an empty LinearRing. The points must form a closed and simple
-   * linestring. Consecutive points must not be equal.
-   * 
-   * @param coordinates a CoordinateSequence possibly empty, or null
-   * @throws IllegalArgumentException if the ring is not closed, or has too few points
-   */
-  public LinearRing createLinearRing(CoordinateSequence coordinates) {
-    return new LinearRing(coordinates, this);
-  }
-
-  /**
-   * Creates a {@link MultiPoint} using the given {@link Point}s.
-   * A null or empty array will create an empty MultiPoint.
-   *
-   * @param point an array of Points (without null elements), or an empty array, or <code>null</code>
-   * @return a MultiPoint object
-   */
-  public MultiPoint createMultiPoint(Point[] point) {
-  	return new MultiPoint(point, this);
-  }
-
-  /**
-   * Creates a {@link MultiPoint} using the given {@link Coordinate}s.
-   * A null or empty array will create an empty MultiPoint.
-   *
-   * @param coordinates an array (without null elements), or an empty array, or <code>null</code>
-   * @return a MultiPoint object
-   */
-  public MultiPoint createMultiPoint(Coordinate[] coordinates) {
-      return createMultiPoint(coordinates != null
-                              ? getCoordinateSequenceFactory().create(coordinates)
-                              : null);
-  }
-
-  /**
-   * Creates a MultiPoint using the given CoordinateSequence.
-   * A a null or empty CoordinateSequence will create an empty MultiPoint.
-   *
-   * @param coordinates a CoordinateSequence (possibly empty), or <code>null</code>
-   * @return a MultiPoint object
-   */
-  public MultiPoint createMultiPoint(CoordinateSequence coordinates) {
-    if (coordinates == null) {
-      return createMultiPoint(new Point[0]);
-    }
-    Point[] points = new Point[coordinates.size()];
-    for (int i = 0; i < coordinates.size(); i++) {
-      points[i] = createPoint(coordinates.getCoordinate(i));
-    }
-    return createMultiPoint(points);
-  }
-
-  /**
-   * Constructs a <code>Polygon</code> with the given exterior boundary and
-   * interior boundaries.
-   *
-   * @param shell
-   *            the outer boundary of the new <code>Polygon</code>, or
-   *            <code>null</code> or an empty <code>LinearRing</code> if
-   *            the empty geometry is to be created.
-   * @param holes
-   *            the inner boundaries of the new <code>Polygon</code>, or
-   *            <code>null</code> or empty <code>LinearRing</code> s if
-   *            the empty geometry is to be created.
-   * @throws IllegalArgumentException if a ring is invalid
-   */
-  public Polygon createPolygon(LinearRing shell, LinearRing[] holes) {
-    return new Polygon(shell, holes, this);
-  }
-
-  /**
-   *  Build an appropriate <code>Geometry</code>, <code>MultiGeometry</code>, or
-   *  <code>GeometryCollection</code> to contain the <code>Geometry</code>s in
-   *  it.
-   * For example:<br>
-   *
-   *  <ul>
-   *    <li> If <code>geomList</code> contains a single <code>Polygon</code>,
-   *    the <code>Polygon</code> is returned.
-   *    <li> If <code>geomList</code> contains several <code>Polygon</code>s, a
-   *    <code>MultiPolygon</code> is returned.
-   *    <li> If <code>geomList</code> contains some <code>Polygon</code>s and
-   *    some <code>LineString</code>s, a <code>GeometryCollection</code> is
-   *    returned.
-   *    <li> If <code>geomList</code> is empty, an empty <code>GeometryCollection</code>
-   *    is returned
-   *  </ul>
-   *
-   * Note that this method does not "flatten" Geometries in the input, and hence if
-   * any MultiGeometries are contained in the input a GeometryCollection containing
-   * them will be returned.
-   *
-   *@param  geomList  the <code>Geometry</code>s to combine
-   *@return           a <code>Geometry</code> of the "smallest", "most
-   *      type-specific" class that can contain the elements of <code>geomList</code>
-   *      .
-   */
-  public Geometry buildGeometry(Collection<? extends Geometry> geomList) {
-  	
-  	/**
-  	 * Determine some facts about the geometries in the list
-  	 */
-    Class<? extends Geometry> geomClass = null;
-    boolean isHeterogeneous = false;
-    boolean hasGeometryCollection = false;
-    for (Iterator<? extends Geometry> i = geomList.iterator(); i.hasNext(); ) {
-      Geometry geom = i.next();
-      Class<? extends Geometry> partClass = geom.getClass();
-      if (geomClass == null) {
-        geomClass = partClass;
-      }
-      if (partClass != geomClass) {
-        isHeterogeneous = true;
-      }
-      if (geom instanceof GeometryCollection)
-        hasGeometryCollection = true;
-    }
-    
-    /**
-     * Now construct an appropriate geometry to return
-     */
-    // for the empty geometry, return an empty GeometryCollection
-    if (geomClass == null) {
-      return createGeometryCollection(null);
-    }
-    if (isHeterogeneous || hasGeometryCollection) {
-      return createGeometryCollection(toGeometryArray(geomList));
-    }
-    // at this point we know the collection is hetereogenous.
-    // Determine the type of the result from the first Geometry in the list
-    // this should always return a geometry, since otherwise an empty collection would have already been returned
-    Geometry geom0 = geomList.iterator().next();
-    boolean isCollection = geomList.size() > 1;
-    if (isCollection) {
-      if (geom0 instanceof Polygon) {
-        return createMultiPolygon(toPolygonArray(geomList));
-      }
-      else if (geom0 instanceof LineString) {
-        return createMultiLineString(toLineStringArray(geomList));
-      }
-      else if (geom0 instanceof Point) {
-        return createMultiPoint(toPointArray(geomList));
-      }
-      Assert.shouldNeverReachHere("Unhandled class: " + geom0.getClass().getName());
-    }
-    return geom0;
-  }
-
-  /**
-   * Creates a LineString using the given Coordinates; a null or empty array will
-   * create an empty LineString. Consecutive points must not be equal.
-   * @param coordinates an array without null elements, or an empty array, or null
-   */
-  public LineString createLineString(Coordinate[] coordinates) {
-    return createLineString(coordinates != null ? getCoordinateSequenceFactory().create(coordinates) : null);
-  }
-  /**
-   * Creates a LineString using the given CoordinateSequence; a null or empty CoordinateSequence will
-   * create an empty LineString. Consecutive points must not be equal.
-   * @param coordinates a CoordinateSequence possibly empty, or null
-   */
-  public LineString createLineString(CoordinateSequence coordinates) {
-	return new LineString(coordinates, this);
-  }
-
-  public CoordinateSequenceFactory getCoordinateSequenceFactory() {
-    return coordinateSequenceFactory;
-  }
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/GeometryFilter.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/GeometryFilter.java	(revision 28245)
+++ 	(revision )
@@ -1,58 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-
-/**
- *  <code>GeometryCollection</code> classes support the concept of
- *  applying a <code>GeometryFilter</code> to the <code>Geometry</code>.
- *  The filter is applied to every element <code>Geometry</code>.
- *  A <code>GeometryFilter</code> can either record information about the <code>Geometry</code>
- *  or change the <code>Geometry</code> in some way.
- *  <code>GeometryFilter</code>
- *  is an example of the Gang-of-Four Visitor pattern.
- *
- *@version 1.7
- */
-public interface GeometryFilter {
-
-  /**
-   *  Performs an operation with or on <code>geom</code>.
-   *
-   *@param  geom  a <code>Geometry</code> to which the filter is applied.
-   */
-  void filter(Geometry geom);
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/IntersectionMatrix.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/IntersectionMatrix.java	(revision 28245)
+++ 	(revision )
@@ -1,444 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-/**
- * Models a Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix. 
- * This class is used to represent intersection matrices (such as "212FF1FF2")
- * capturing the topological relationship between two {@link Geometry}s. 
- * It can also be represent patterns (such as "T*T******")for matching 
- * existing matrices.
- *
- *  Methods are provided to:
- *  <UL>
- *    <LI> set and query the elements of the matrix in a convenient fashion
- *    <LI> convert to and from the standard string representation (specified in
- *    SFS Section 2.1.13.2).
- *    <LI> test to see if a matrix matches a given pattern string.
- *  </UL>
- *  <P>
- *
- *  For a description of the DE-9IM, see the <A
- *  HREF="http://www.opengis.org/techno/specs.htm">OpenGIS Simple Features
- *  Specification for SQL</A>.
- *  
- * The entries of the matrix are defined by the constants in the {@link Dimension} class.
- * The indices of the matrix represent the topological locations 
- * that occur in a geometry (Interior, Boundary, Exterior).  
- * These are provided as constants in the {@link Location} class.
- *  
- *
- *@version 1.7
- */
-public class IntersectionMatrix implements Cloneable {
-  /**
-   *  Internal representation of this <code>IntersectionMatrix</code>.
-   */
-  private int[][] matrix;
-
-  /**
-   *  Creates an <code>IntersectionMatrix</code> with <code>FALSE</code>
-   *  dimension values.
-   */
-  public IntersectionMatrix() {
-    matrix = new int[3][3];
-    setAll(Dimension.FALSE);
-  }
-
-  /**
-   *  Returns true if the dimension value satisfies the dimension symbol.
-   *
-   *@param  actualDimensionValue     a number that can be stored in the <code>IntersectionMatrix</code>
-   *      . Possible values are <code>{TRUE, FALSE, DONTCARE, 0, 1, 2}</code>.
-   *@param  requiredDimensionSymbol  a character used in the string
-   *      representation of an <code>IntersectionMatrix</code>. Possible values
-   *      are <code>{T, F, * , 0, 1, 2}</code>.
-   *@return                          true if the dimension symbol encompasses
-   *      the dimension value
-   */
-  public static boolean matches(int actualDimensionValue, char requiredDimensionSymbol) {
-    if (requiredDimensionSymbol == '*') {
-      return true;
-    }
-    if (requiredDimensionSymbol == 'T' && (actualDimensionValue >= 0 || actualDimensionValue
-         == Dimension.TRUE)) {
-      return true;
-    }
-    if (requiredDimensionSymbol == 'F' && actualDimensionValue == Dimension.FALSE) {
-      return true;
-    }
-    if (requiredDimensionSymbol == '0' && actualDimensionValue == Dimension.P) {
-      return true;
-    }
-    if (requiredDimensionSymbol == '1' && actualDimensionValue == Dimension.L) {
-      return true;
-    }
-    if (requiredDimensionSymbol == '2' && actualDimensionValue == Dimension.A) {
-      return true;
-    }
-    return false;
-  }
-
-  /**
-   *  Changes the value of one of this <code>IntersectionMatrix</code>s
-   *  elements.
-   *
-   *@param  row             the row of this <code>IntersectionMatrix</code>,
-   *      indicating the interior, boundary or exterior of the first <code>Geometry</code>
-   *@param  column          the column of this <code>IntersectionMatrix</code>,
-   *      indicating the interior, boundary or exterior of the second <code>Geometry</code>
-   *@param  dimensionValue  the new value of the element
-   */
-  public void set(int row, int column, int dimensionValue) {
-    matrix[row][column] = dimensionValue;
-  }
-
-
-  /**
-   *  Changes the specified element to <code>minimumDimensionValue</code> if the
-   *  element is less.
-   *
-   *@param  row                    the row of this <code>IntersectionMatrix</code>
-   *      , indicating the interior, boundary or exterior of the first <code>Geometry</code>
-   *@param  column                 the column of this <code>IntersectionMatrix</code>
-   *      , indicating the interior, boundary or exterior of the second <code>Geometry</code>
-   *@param  minimumDimensionValue  the dimension value with which to compare the
-   *      element. The order of dimension values from least to greatest is
-   *      <code>{DONTCARE, TRUE, FALSE, 0, 1, 2}</code>.
-   */
-  public void setAtLeast(int row, int column, int minimumDimensionValue) {
-    if (matrix[row][column] < minimumDimensionValue) {
-      matrix[row][column] = minimumDimensionValue;
-    }
-  }
-
-  /**
-   *  If row >= 0 and column >= 0, changes the specified element to <code>minimumDimensionValue</code>
-   *  if the element is less. Does nothing if row <0 or column < 0.
-   *
-   *@param  row                    the row of this <code>IntersectionMatrix</code>
-   *      , indicating the interior, boundary or exterior of the first <code>Geometry</code>
-   *@param  column                 the column of this <code>IntersectionMatrix</code>
-   *      , indicating the interior, boundary or exterior of the second <code>Geometry</code>
-   *@param  minimumDimensionValue  the dimension value with which to compare the
-   *      element. The order of dimension values from least to greatest is
-   *      <code>{DONTCARE, TRUE, FALSE, 0, 1, 2}</code>.
-   */
-  public void setAtLeastIfValid(int row, int column, int minimumDimensionValue) {
-    if (row >= 0 && column >= 0) {
-      setAtLeast(row, column, minimumDimensionValue);
-    }
-  }
-
-  /**
-   *  For each element in this <code>IntersectionMatrix</code>, changes the
-   *  element to the corresponding minimum dimension symbol if the element is
-   *  less.
-   *
-   *@param  minimumDimensionSymbols  nine dimension symbols with which to
-   *      compare the elements of this <code>IntersectionMatrix</code>. The
-   *      order of dimension values from least to greatest is <code>{DONTCARE, TRUE, FALSE, 0, 1, 2}</code>
-   *      .
-   */
-  public void setAtLeast(String minimumDimensionSymbols) {
-    for (int i = 0; i < minimumDimensionSymbols.length(); i++) {
-      int row = i / 3;
-      int col = i % 3;
-      setAtLeast(row, col, Dimension.toDimensionValue(minimumDimensionSymbols.charAt(i)));
-    }
-  }
-
-  /**
-   *  Changes the elements of this <code>IntersectionMatrix</code> to <code>dimensionValue</code>
-   *  .
-   *
-   *@param  dimensionValue  the dimension value to which to set this <code>IntersectionMatrix</code>
-   *      s elements. Possible values <code>{TRUE, FALSE, DONTCARE, 0, 1, 2}</code>
-   *      .
-   */
-  public void setAll(int dimensionValue) {
-    for (int ai = 0; ai < 3; ai++) {
-      for (int bi = 0; bi < 3; bi++) {
-        matrix[ai][bi] = dimensionValue;
-      }
-    }
-  }
-
-
-  /**
-   *  Returns <code>true</code> if this <code>IntersectionMatrix</code> is
-   *  FF*FF****.
-   *
-   *@return    <code>true</code> if the two <code>Geometry</code>s related by
-   *      this <code>IntersectionMatrix</code> are disjoint
-   */
-  public boolean isDisjoint() {
-    return
-        matrix[Location.INTERIOR][Location.INTERIOR] == Dimension.FALSE &&
-        matrix[Location.INTERIOR][Location.BOUNDARY] == Dimension.FALSE &&
-        matrix[Location.BOUNDARY][Location.INTERIOR] == Dimension.FALSE &&
-        matrix[Location.BOUNDARY][Location.BOUNDARY] == Dimension.FALSE;
-  }
-
-  /**
-   *  Returns <code>true</code> if <code>isDisjoint</code> returns false.
-   *
-   *@return    <code>true</code> if the two <code>Geometry</code>s related by
-   *      this <code>IntersectionMatrix</code> intersect
-   */
-  public boolean isIntersects() {
-    return ! isDisjoint();
-  }
-
-  /**
-   *  Returns <code>true</code> if this <code>IntersectionMatrix</code> is
-   *  FT*******, F**T***** or F***T****.
-   *
-   *@param  dimensionOfGeometryA  the dimension of the first <code>Geometry</code>
-   *@param  dimensionOfGeometryB  the dimension of the second <code>Geometry</code>
-   *@return                       <code>true</code> if the two <code>Geometry</code>
-   *      s related by this <code>IntersectionMatrix</code> touch; Returns false
-   *      if both <code>Geometry</code>s are points.
-   */
-  public boolean isTouches(int dimensionOfGeometryA, int dimensionOfGeometryB) {
-    if (dimensionOfGeometryA > dimensionOfGeometryB) {
-      //no need to get transpose because pattern matrix is symmetrical
-      return isTouches(dimensionOfGeometryB, dimensionOfGeometryA);
-    }
-    if ((dimensionOfGeometryA == Dimension.A && dimensionOfGeometryB == Dimension.A) ||
-        (dimensionOfGeometryA == Dimension.L && dimensionOfGeometryB == Dimension.L) ||
-        (dimensionOfGeometryA == Dimension.L && dimensionOfGeometryB == Dimension.A) ||
-        (dimensionOfGeometryA == Dimension.P && dimensionOfGeometryB == Dimension.A) ||
-        (dimensionOfGeometryA == Dimension.P && dimensionOfGeometryB == Dimension.L)) {
-      return matrix[Location.INTERIOR][Location.INTERIOR] == Dimension.FALSE &&
-          (matches(matrix[Location.INTERIOR][Location.BOUNDARY], 'T')
-           || matches(matrix[Location.BOUNDARY][Location.INTERIOR], 'T')
-           || matches(matrix[Location.BOUNDARY][Location.BOUNDARY], 'T'));
-    }
-    return false;
-  }
-
-  /**
-   * Tests whether this geometry crosses the
-   * specified geometry.
-   * <p>
-   * The <code>crosses</code> predicate has the following equivalent definitions:
-   * <ul>
-   * <li>The geometries have some but not all interior points in common.
-   * <li>The DE-9IM Intersection Matrix for the two geometries is
-   *   <ul>
-   *    <li>T*T****** (for P/L, P/A, and L/A situations)
-   *    <li>T*****T** (for L/P, L/A, and A/L situations)
-   *    <li>0******** (for L/L situations)
-   *   </ul>
-   * </ul>
-   * For any other combination of dimensions this predicate returns <code>false</code>.
-   * <p>
-   * The SFS defined this predicate only for P/L, P/A, L/L, and L/A situations.
-   * JTS extends the definition to apply to L/P, A/P and A/L situations as well.
-   * This makes the relation symmetric.
-   *
-   *@param  dimensionOfGeometryA  the dimension of the first <code>Geometry</code>
-   *@param  dimensionOfGeometryB  the dimension of the second <code>Geometry</code>
-   *@return                       <code>true</code> if the two <code>Geometry</code>s
-   *      related by this <code>IntersectionMatrix</code> cross.
-   */
-  public boolean isCrosses(int dimensionOfGeometryA, int dimensionOfGeometryB) {
-    if ((dimensionOfGeometryA == Dimension.P && dimensionOfGeometryB == Dimension.L) ||
-        (dimensionOfGeometryA == Dimension.P && dimensionOfGeometryB == Dimension.A) ||
-        (dimensionOfGeometryA == Dimension.L && dimensionOfGeometryB == Dimension.A)) {
-      return matches(matrix[Location.INTERIOR][Location.INTERIOR], 'T') &&
-          matches(matrix[Location.INTERIOR][Location.EXTERIOR], 'T');
-    }
-    if ((dimensionOfGeometryA == Dimension.L && dimensionOfGeometryB == Dimension.P) ||
-        (dimensionOfGeometryA == Dimension.A && dimensionOfGeometryB == Dimension.P) ||
-        (dimensionOfGeometryA == Dimension.A && dimensionOfGeometryB == Dimension.L)) {
-      return matches(matrix[Location.INTERIOR][Location.INTERIOR], 'T') &&
-          matches(matrix[Location.EXTERIOR][Location.INTERIOR], 'T');
-    }
-    if (dimensionOfGeometryA == Dimension.L && dimensionOfGeometryB == Dimension.L) {
-      return matrix[Location.INTERIOR][Location.INTERIOR] == 0;
-    }
-    return false;
-  }
-
-  /**
-   *  Tests whether this <code>IntersectionMatrix</code> is
-   *  T*****FF*.
-   *
-   *@return    <code>true</code> if the first <code>Geometry</code> contains the
-   *      second
-   */
-  public boolean isContains() {
-    return matches(matrix[Location.INTERIOR][Location.INTERIOR], 'T') &&
-        matrix[Location.EXTERIOR][Location.INTERIOR] == Dimension.FALSE &&
-        matrix[Location.EXTERIOR][Location.BOUNDARY] == Dimension.FALSE;
-  }
-
-  /**
-   *  Returns <code>true</code> if this <code>IntersectionMatrix</code> is
-   *    <code>T*****FF*</code>
-   * or <code>*T****FF*</code>
-   * or <code>***T**FF*</code>
-   * or <code>****T*FF*</code>
-   *
-   *@return    <code>true</code> if the first <code>Geometry</code> covers the
-   *      second
-   */
-  public boolean isCovers() {
-    boolean hasPointInCommon =
-        matches(matrix[Location.INTERIOR][Location.INTERIOR], 'T')
-        || matches(matrix[Location.INTERIOR][Location.BOUNDARY], 'T')
-        || matches(matrix[Location.BOUNDARY][Location.INTERIOR], 'T')
-        || matches(matrix[Location.BOUNDARY][Location.BOUNDARY], 'T');
-
-    return hasPointInCommon &&
-        matrix[Location.EXTERIOR][Location.INTERIOR] == Dimension.FALSE &&
-        matrix[Location.EXTERIOR][Location.BOUNDARY] == Dimension.FALSE;
-  }
-
-
-  /**
-   *  Returns <code>true</code> if this <code>IntersectionMatrix</code> is
-   *  T*F**FFF*.
-   *
-   *@param  dimensionOfGeometryA  the dimension of the first <code>Geometry</code>
-   *@param  dimensionOfGeometryB  the dimension of the second <code>Geometry</code>
-   *@return                       <code>true</code> if the two <code>Geometry</code>
-   *      s related by this <code>IntersectionMatrix</code> are equal; the
-   *      <code>Geometry</code>s must have the same dimension for this function
-   *      to return <code>true</code>
-   */
-  public boolean isEquals(int dimensionOfGeometryA, int dimensionOfGeometryB) {
-    if (dimensionOfGeometryA != dimensionOfGeometryB) {
-      return false;
-    }
-    return matches(matrix[Location.INTERIOR][Location.INTERIOR], 'T') &&
-        matrix[Location.EXTERIOR][Location.INTERIOR] == Dimension.FALSE &&
-        matrix[Location.INTERIOR][Location.EXTERIOR] == Dimension.FALSE &&
-        matrix[Location.EXTERIOR][Location.BOUNDARY] == Dimension.FALSE &&
-        matrix[Location.BOUNDARY][Location.EXTERIOR] == Dimension.FALSE;
-  }
-
-  /**
-   *  Returns <code>true</code> if this <code>IntersectionMatrix</code> is
-   *  <UL>
-   *    <LI> T*T***T** (for two points or two surfaces)
-   *    <LI> 1*T***T** (for two curves)
-   *  </UL>.
-   *
-   *@param  dimensionOfGeometryA  the dimension of the first <code>Geometry</code>
-   *@param  dimensionOfGeometryB  the dimension of the second <code>Geometry</code>
-   *@return                       <code>true</code> if the two <code>Geometry</code>s
-   *      related by this <code>IntersectionMatrix</code> overlap. For this
-   *      function to return <code>true</code>, the <code>Geometry</code>s must
-   *      be two points, two curves or two surfaces.
-   */
-  public boolean isOverlaps(int dimensionOfGeometryA, int dimensionOfGeometryB) {
-    if ((dimensionOfGeometryA == Dimension.P && dimensionOfGeometryB == Dimension.P) ||
-        (dimensionOfGeometryA == Dimension.A && dimensionOfGeometryB == Dimension.A)) {
-      return matches(matrix[Location.INTERIOR][Location.INTERIOR], 'T') &&
-          matches(matrix[Location.INTERIOR][Location.EXTERIOR], 'T') && matches(matrix[Location.EXTERIOR][Location.INTERIOR],
-          'T');
-    }
-    if (dimensionOfGeometryA == Dimension.L && dimensionOfGeometryB == Dimension.L) {
-      return matrix[Location.INTERIOR][Location.INTERIOR] == 1 &&
-          matches(matrix[Location.INTERIOR][Location.EXTERIOR], 'T') &&
-          matches(matrix[Location.EXTERIOR][Location.INTERIOR], 'T');
-    }
-    return false;
-  }
-
-  /**
-   *  Returns whether the elements of this <code>IntersectionMatrix</code>
-   *  satisfies the required dimension symbols.
-   *
-   *@param  requiredDimensionSymbols  nine dimension symbols with which to
-   *      compare the elements of this <code>IntersectionMatrix</code>. Possible
-   *      values are <code>{T, F, * , 0, 1, 2}</code>.
-   *@return                           <code>true</code> if this <code>IntersectionMatrix</code>
-   *      matches the required dimension symbols
-   */
-  public boolean matches(String requiredDimensionSymbols) {
-    if (requiredDimensionSymbols.length() != 9) {
-      throw new IllegalArgumentException("Should be length 9: " + requiredDimensionSymbols);
-    }
-    for (int ai = 0; ai < 3; ai++) {
-      for (int bi = 0; bi < 3; bi++) {
-        if (!matches(matrix[ai][bi], requiredDimensionSymbols.charAt(3 * ai +
-            bi))) {
-          return false;
-        }
-      }
-    }
-    return true;
-  }
-
-  /**
-   *  Transposes this IntersectionMatrix.
-   *
-   *@return    this <code>IntersectionMatrix</code> as a convenience
-   */
-  public IntersectionMatrix transpose() { // NO_UCD
-    int temp = matrix[1][0];
-    matrix[1][0] = matrix[0][1];
-    matrix[0][1] = temp;
-    temp = matrix[2][0];
-    matrix[2][0] = matrix[0][2];
-    matrix[0][2] = temp;
-    temp = matrix[2][1];
-    matrix[2][1] = matrix[1][2];
-    matrix[1][2] = temp;
-    return this;
-  }
-
-  /**
-   *  Returns a nine-character <code>String</code> representation of this <code>IntersectionMatrix</code>
-   *  .
-   *
-   *@return    the nine dimension symbols of this <code>IntersectionMatrix</code>
-   *      in row-major order.
-   */
-  public String toString() {
-    StringBuffer buf = new StringBuffer("123456789");
-    for (int ai = 0; ai < 3; ai++) {
-      for (int bi = 0; bi < 3; bi++) {
-        buf.setCharAt(3 * ai + bi, Dimension.toDimensionSymbol(matrix[ai][bi]));
-      }
-    }
-    return buf.toString();
-  }
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/LineSegment.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/LineSegment.java	(revision 28245)
+++ 	(revision )
@@ -1,298 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.io.Serializable;
-
-import com.vividsolutions.jts.algorithm.CGAlgorithms;
-import com.vividsolutions.jts.algorithm.LineIntersector;
-import com.vividsolutions.jts.algorithm.RobustLineIntersector;
-
-/**
- * Represents a line segment defined by two {@link Coordinate}s.
- * Provides methods to compute various geometric properties
- * and relationships of line segments.
- * <p>
- * This class is designed to be easily mutable (to the extent of
- * having its contained points public).
- * This supports a common pattern of reusing a single LineSegment
- * object as a way of computing segment properties on the
- * segments defined by arrays or lists of {@link Coordinate}s.
- *
- *@version 1.7
- */
-public class LineSegment
-  implements Comparable<LineSegment>, Serializable
-{
-  private static final long serialVersionUID = 3252005833466256227L;
-
-  public Coordinate p0, p1;
-
-  public LineSegment(Coordinate p0, Coordinate p1) {
-    this.p0 = p0;
-    this.p1 = p1;
-  }
-
-
-  public LineSegment() {
-    this(new Coordinate(), new Coordinate());
-  }
-
-  public Coordinate getCoordinate(int i)
-  {
-    if (i == 0) return p0;
-    return p1;
-  }
-
-
-
-  /**
-   * Computes the distance between this line segment and a given point.
-   *
-   * @return the distance from this segment to the given point
-   */
-  public double distance(Coordinate p)
-  {
-    return CGAlgorithms.distancePointLine(p, p0, p1);
-  }
-
-
-
-  /**
-   * Computes the Projection Factor for the projection of the point p
-   * onto this LineSegment.  The Projection Factor is the constant r
-   * by which the vector for this segment must be multiplied to
-   * equal the vector for the projection of <tt>p<//t> on the line
-   * defined by this segment.
-   * <p>
-   * The projection factor returned will be in the range <tt>(-inf, +inf)</tt>.
-   * 
-   * @param p the point to compute the factor for
-   * @return the projection factor for the point
-   */
-  public double projectionFactor(Coordinate p)
-  {
-    if (p.equals(p0)) return 0.0;
-    if (p.equals(p1)) return 1.0;
-    // Otherwise, use comp.graphics.algorithms Frequently Asked Questions method
-    /*     	      AC dot AB
-                   r = ---------
-                         ||AB||^2
-                r has the following meaning:
-                r=0 P = A
-                r=1 P = B
-                r<0 P is on the backward extension of AB
-                r>1 P is on the forward extension of AB
-                0<r<1 P is interior to AB
-        */
-    double dx = p1.x - p0.x;
-    double dy = p1.y - p0.y;
-    double len2 = dx * dx + dy * dy;
-    double r = ( (p.x - p0.x) * dx + (p.y - p0.y) * dy )
-              / len2;
-    return r;
-  }
-
-
-  /**
-   * Compute the projection of a point onto the line determined
-   * by this line segment.
-   * <p>
-   * Note that the projected point
-   * may lie outside the line segment.  If this is the case,
-   * the projection factor will lie outside the range [0.0, 1.0].
-   */
-  public Coordinate project(Coordinate p)
-  {
-    if (p.equals(p0) || p.equals(p1)) return new Coordinate(p);
-
-    double r = projectionFactor(p);
-    Coordinate coord = new Coordinate();
-    coord.x = p0.x + r * (p1.x - p0.x);
-    coord.y = p0.y + r * (p1.y - p0.y);
-    return coord;
-  }
-
-  /**
-   * Computes the closest point on this line segment to another point.
-   * @param p the point to find the closest point to
-   * @return a Coordinate which is the closest point on the line segment to the point p
-   */
-  public Coordinate closestPoint(Coordinate p)
-  {
-    double factor = projectionFactor(p);
-    if (factor > 0 && factor < 1) {
-      return project(p);
-    }
-    double dist0 = p0.distance(p);
-    double dist1 = p1.distance(p);
-    if (dist0 < dist1)
-      return p0;
-    return p1;
-  }
-  /**
-   * Computes the closest points on two line segments.
-   * 
-   * @param line the segment to find the closest point to
-   * @return a pair of Coordinates which are the closest points on the line segments
-   */
-  public Coordinate[] closestPoints(LineSegment line)
-  {
-    // test for intersection
-    Coordinate intPt = intersection(line);
-    if (intPt != null) {
-      return new Coordinate[] { intPt, intPt };
-    }
-
-    /**
-     *  if no intersection closest pair contains at least one endpoint.
-     * Test each endpoint in turn.
-     */
-    Coordinate[] closestPt = new Coordinate[2];
-    double minDistance = Double.MAX_VALUE;
-    double dist;
-
-    Coordinate close00 = closestPoint(line.p0);
-    minDistance = close00.distance(line.p0);
-    closestPt[0] = close00;
-    closestPt[1] = line.p0;
-
-    Coordinate close01 = closestPoint(line.p1);
-    dist = close01.distance(line.p1);
-    if (dist < minDistance) {
-      minDistance = dist;
-      closestPt[0] = close01;
-      closestPt[1] = line.p1;
-    }
-
-    Coordinate close10 = line.closestPoint(p0);
-    dist = close10.distance(p0);
-    if (dist < minDistance) {
-      minDistance = dist;
-      closestPt[0] = p0;
-      closestPt[1] = close10;
-    }
-
-    Coordinate close11 = line.closestPoint(p1);
-    dist = close11.distance(p1);
-    if (dist < minDistance) {
-      minDistance = dist;
-      closestPt[0] = p1;
-      closestPt[1] = close11;
-    }
-
-    return closestPt;
-  }
-
-  /**
-   * Computes an intersection point between two line segments, if there is one.
-   * There may be 0, 1 or many intersection points between two segments.
-   * If there are 0, null is returned. If there is 1 or more, 
-   * exactly one of them is returned 
-   * (chosen at the discretion of the algorithm).  
-   * If more information is required about the details of the intersection,
-   * the {@link RobustLineIntersector} class should be used.
-   *
-   * @param line a line segment
-   * @return an intersection point, or <code>null</code> if there is none
-   * 
-   * @see RobustLineIntersector
-   */
-  public Coordinate intersection(LineSegment line)
-  {
-    LineIntersector li = new RobustLineIntersector();
-    li.computeIntersection(p0, p1, line.p0, line.p1);
-    if (li.hasIntersection())
-      return li.getIntersection(0);
-    return null;
-  }
-  
-  /**
-   *  Returns <code>true</code> if <code>other</code> has the same values for
-   *  its points.
-   *
-   *@param  o  a <code>LineSegment</code> with which to do the comparison.
-   *@return        <code>true</code> if <code>other</code> is a <code>LineSegment</code>
-   *      with the same values for the x and y ordinates.
-   */
-  public boolean equals(Object o) {
-    if (!(o instanceof LineSegment)) {
-      return false;
-    }
-    LineSegment other = (LineSegment) o;
-    return p0.equals(other.p0) && p1.equals(other.p1);
-  }
-
-  /**
-   * Gets a hashcode for this object.
-   * 
-   * @return a hashcode for this object
-   */
-  public int hashCode() {
-    long bits0 = java.lang.Double.doubleToLongBits(p0.x);
-    bits0 ^= java.lang.Double.doubleToLongBits(p0.y) * 31;
-    int hash0 = (((int) bits0) ^ ((int) (bits0  >> 32)));
-    
-    long bits1 = java.lang.Double.doubleToLongBits(p1.x);
-    bits1 ^= java.lang.Double.doubleToLongBits(p1.y) * 31;
-    int hash1 = (((int) bits1) ^ ((int) (bits1  >> 32)));
-
-    // XOR is supposed to be a good way to combine hashcodes
-    return hash0 ^ hash1;
-  }
-
-  /**
-   *  Compares this object with the specified object for order.
-   *  Uses the standard lexicographic ordering for the points in the LineSegment.
-   *
-   *@param  o  the <code>LineSegment</code> with which this <code>LineSegment</code>
-   *      is being compared
-   *@return    a negative integer, zero, or a positive integer as this <code>LineSegment</code>
-   *      is less than, equal to, or greater than the specified <code>LineSegment</code>
-   */
-  public int compareTo(LineSegment o) {
-    int comp0 = p0.compareTo(o.p0);
-    if (comp0 != 0) return comp0;
-    return p1.compareTo(o.p1);
-  }
-
-  public String toString()
-  {
-    return "LINESTRING( " +
-        p0.x + " " + p0.y
-        + ", " +
-        p1.x + " " + p1.y + ")";
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/LineString.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/LineString.java	(revision 28245)
+++ 	(revision )
@@ -1,303 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import com.vividsolutions.jts.algorithm.CGAlgorithms;
-import com.vividsolutions.jts.operation.BoundaryOp;
-
-/**
- *  Models an OGC-style <code>LineString</code>.
- *  A LineString consists of a sequence of two or more vertices,
- *  along with all points along the linearly-interpolated curves
- *  (line segments) between each 
- *  pair of consecutive vertices.
- *  Consecutive vertices may be equal.
- *  The line segments in the line may intersect each other (in other words, 
- *  the linestring may "curl back" in itself and self-intersect.
- *  Linestrings with exactly two identical points are invalid. 
- *  <p> 
- * A linestring must have either 0 or 2 or more points.  
- * If these conditions are not met, the constructors throw 
- * an {@link IllegalArgumentException}
- *
- *@version 1.7
- */
-public class LineString 
-	extends Geometry 
-	implements Lineal
-{
-  private static final long serialVersionUID = 3110669828065365560L;
-  /**
-   *  The points of this <code>LineString</code>.
-   */
-  protected CoordinateSequence points;
-
-  /**
-   * Constructs a <code>LineString</code> with the given points.
-   *  
-   *@param  points          the points of the linestring, or <code>null</code>
-   *      to create the empty geometry. Consecutive points may not be equal.
-   * @throws IllegalArgumentException if too few points are provided
-   */
-  public LineString(CoordinateSequence points, GeometryFactory factory) {
-    super(factory);
-    init(points);
-  }
-
-  private void init(CoordinateSequence points)
-  {
-    if (points == null) {
-      points = getFactory().getCoordinateSequenceFactory().create(new Coordinate[]{});
-    }
-    if (points.size() == 1) {
-      throw new IllegalArgumentException("Invalid number of points in LineString (found " 
-      		+ points.size() + " - must be 0 or >= 2)");
-    }
-    this.points = points;
-  }
-  public Coordinate[] getCoordinates() {
-    return points.toCoordinateArray();
-  }
-
-  public CoordinateSequence getCoordinateSequence() {
-      return points;
-  }
-
-  public Coordinate getCoordinateN(int n) {
-      return points.getCoordinate(n);
-  }
-
-  public Coordinate getCoordinate()
-  {
-    if (isEmpty()) return null;
-    return points.getCoordinate(0);
-  }
-
-  public int getDimension() {
-    return 1;
-  }
-
-  public int getBoundaryDimension() {
-    if (isClosed()) {
-      return Dimension.FALSE;
-    }
-    return 0;
-  }
-
-  public boolean isEmpty() {
-      return points.size() == 0;
-  }
-
-  public int getNumPoints() {
-      return points.size();
-  }
-
-  public Point getPointN(int n) {
-      return getFactory().createPoint(points.getCoordinate(n));
-  }
-
-  public Point getStartPoint() {
-    if (isEmpty()) {
-      return null;
-    }
-    return getPointN(0);
-  }
-
-  public Point getEndPoint() {
-    if (isEmpty()) {
-      return null;
-    }
-    return getPointN(getNumPoints() - 1);
-  }
-
-  public boolean isClosed() {
-    if (isEmpty()) {
-      return false;
-    }
-    return getCoordinateN(0).equals2D(getCoordinateN(getNumPoints() - 1));
-  }
-
-  public String getGeometryType() {
-    return "LineString";
-  }
-
-  /**
-   *  Returns the length of this <code>LineString</code>
-   *
-   *@return the length of the linestring
-   */
-  public double getLength()
-  {
-   return CGAlgorithms.length(points);
-  }
-
-  /**
-   * Gets the boundary of this geometry.
-   * The boundary of a lineal geometry is always a zero-dimensional geometry (which may be empty).
-   *
-   * @return the boundary geometry
-   * @see Geometry#getBoundary
-   */
-  public Geometry getBoundary() {
-    return (new BoundaryOp(this)).getBoundary();
-  }
-
-  /**
-   * Creates a {@link LineString} whose coordinates are in the reverse
-   * order of this objects
-   *
-   * @return a {@link LineString} with coordinates in the reverse order
-   */
-  public Geometry reverse()
-  {
-    CoordinateSequence seq = (CoordinateSequence) points.clone();
-    CoordinateSequences.reverse(seq);
-    LineString revLine = getFactory().createLineString(seq);
-    return revLine;
-  }
-
-  protected Envelope computeEnvelopeInternal() {
-    if (isEmpty()) {
-      return new Envelope();
-    }
-    return points.expandEnvelope(new Envelope());
-  }
-
-  public boolean equalsExact(Geometry other, double tolerance) {
-    if (!isEquivalentClass(other)) {
-      return false;
-    }
-    LineString otherLineString = (LineString) other;
-    if (points.size() != otherLineString.points.size()) {
-      return false;
-    }
-    for (int i = 0; i < points.size(); i++) {
-      if (!equal(points.getCoordinate(i), otherLineString.points.getCoordinate(i), tolerance)) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  public void apply(CoordinateFilter filter) {
-      for (int i = 0; i < points.size(); i++) {
-        filter.filter(points.getCoordinate(i));
-      }
-  }
-
-  public void apply(CoordinateSequenceFilter filter) 
-  {
-    if (points.size() == 0)
-      return;
-    for (int i = 0; i < points.size(); i++) {
-      filter.filter(points, i);
-      if (filter.isDone())
-        break;
-    }
-    if (filter.isGeometryChanged())
-      geometryChanged();
-  }
-
-  public void apply(GeometryFilter filter) {
-    filter.filter(this);
-  }
-
-  public void apply(GeometryComponentFilter filter) {
-    filter.filter(this);
-  }
-
-  /**
-   * Creates and returns a full copy of this {@link LineString} object.
-   * (including all coordinates contained by it).
-   *
-   * @return a clone of this instance
-   */
-  public Object clone() {
-    LineString ls = (LineString) super.clone();
-    ls.points = (CoordinateSequence) points.clone();
-    return ls;
-  }
-
-  /**
-   * Normalizes a LineString.  A normalized linestring
-   * has the first point which is not equal to it's reflected point
-   * less than the reflected point.
-   */
-  public void normalize()
-  {
-      for (int i = 0; i < points.size() / 2; i++) {
-        int j = points.size() - 1 - i;
-        // skip equal points on both ends
-        if (!points.getCoordinate(i).equals(points.getCoordinate(j))) {
-          if (points.getCoordinate(i).compareTo(points.getCoordinate(j)) > 0) {
-            CoordinateArrays.reverse(getCoordinates());
-          }
-          return;
-        }
-      }
-  }
-
-  protected boolean isEquivalentClass(Geometry other) {
-    return other instanceof LineString;
-  }
-
-  protected int compareToSameClass(Object o)
-  {
-    LineString line = (LineString) o;
-    // MD - optimized implementation
-    int i = 0;
-    int j = 0;
-    while (i < points.size() && j < line.points.size()) {
-      int comparison = points.getCoordinate(i).compareTo(line.points.getCoordinate(j));
-      if (comparison != 0) {
-        return comparison;
-      }
-      i++;
-      j++;
-    }
-    if (i < points.size()) {
-      return 1;
-    }
-    if (j < line.points.size()) {
-      return -1;
-    }
-    return 0;
-  }
-
-  protected int compareToSameClass(Object o, CoordinateSequenceComparator comp)
-  {
-    LineString line = (LineString) o;
-    return comp.compare(this.points, line.points);
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Lineal.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Lineal.java	(revision 28245)
+++ 	(revision )
@@ -1,12 +1,0 @@
-package com.vividsolutions.jts.geom;
-
-/**
- * Identifies {@link Geometry} subclasses which
- * are 1-dimensional and have components which are {@link LineString}s. 
- * 
- * @author Martin Davis
- *
- */
-public interface Lineal {
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/LinearRing.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/LinearRing.java	(revision 28245)
+++ 	(revision )
@@ -1,127 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-/**
- * Models an OGC SFS <code>LinearRing</code>.
- * A LinearRing is a LineString which is both closed and simple.
- * In other words,
- * the first and last coordinate in the ring must be equal,
- * and the interior of the ring must not self-intersect.
- * Either orientation of the ring is allowed.
- * <p>
- * A ring must have either 0 or 4 or more points.  
- * The first and last points must be equal (in 2D).
- * If these conditions are not met, the constructors throw 
- * an {@link IllegalArgumentException}
- *
- * @version 1.7
- */
-public class LinearRing extends LineString
-{
-  /**
-   * The minimum number of vertices allowed in a valid non-empty ring (= 4).
-   * Empty rings with 0 vertices are also valid.
-   */
-  public static final int MINIMUM_VALID_SIZE = 4;
-  
-  private static final long serialVersionUID = -4261142084085851829L;
-
-  /**
-   * Constructs a <code>LinearRing</code> with the vertices
-   * specifed by the given {@link CoordinateSequence}.
-   *
-   *@param  points  a sequence points forming a closed and simple linestring, or
-   *      <code>null</code> to create the empty geometry.
-   *      
-   * @throws IllegalArgumentException if the ring is not closed, or has too few points
-   *
-   */
-  public LinearRing(CoordinateSequence points, GeometryFactory factory) {
-    super(points, factory);
-    validateConstruction();
-  }
-
-  private void validateConstruction() {
-    if (!isEmpty() && ! super.isClosed()) {
-      throw new IllegalArgumentException("Points of LinearRing do not form a closed linestring");
-    }
-    if (getCoordinateSequence().size() >= 1 && getCoordinateSequence().size() < MINIMUM_VALID_SIZE) {
-      throw new IllegalArgumentException("Invalid number of points in LinearRing (found " 
-      		+ getCoordinateSequence().size() + " - must be 0 or >= 4)");
-    }
-  }
-
-  /**
-   * Returns <code>Dimension.FALSE</code>, since by definition LinearRings do
-   * not have a boundary.
-   *
-   * @return Dimension.FALSE
-   */
-  public int getBoundaryDimension() {
-    return Dimension.FALSE;
-  }
-
-  /**
-   * Returns <code>true</code>, since by definition LinearRings are always simple.
-   * @return <code>true</code>
-   *
-   * @see Geometry#isSimple
-   */
-  public boolean isSimple() {
-    return true;
-  }
-
-  public boolean isClosed() {
-    if (isEmpty()) {
-    	// empty LinearRings are closed by definition
-      return true;
-    }
-    return super.isClosed();
-  }
-
-
-  public String getGeometryType() {
-    return "LinearRing";
-  }
-
-  public Geometry reverse()
-  {
-    CoordinateSequence seq = (CoordinateSequence) points.clone();
-    CoordinateSequences.reverse(seq);
-    LinearRing rev = getFactory().createLinearRing(seq);
-    return rev;
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Location.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Location.java	(revision 28245)
+++ 	(revision )
@@ -1,92 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-/**
- *  Constants representing the different topological locations
- *  which can occur in a {@link Geometry}. 
- *  The constants are also used as the row and column indices 
- *  of DE-9IM {@link IntersectionMatrix}es. 
- *
- *@version 1.7
- */
-public class Location {
-  /**
-   * The location value for the interior of a geometry.
-   * Also, DE-9IM row index of the interior of the first geometry and column index of
-   *  the interior of the second geometry. 
-   */
-  public final static int INTERIOR = 0;
-  /**
-   * The location value for the boundary of a geometry.
-   * Also, DE-9IM row index of the boundary of the first geometry and column index of
-   *  the boundary of the second geometry. 
-   */
-  public final static int BOUNDARY = 1;
-  /**
-   * The location value for the exterior of a geometry.
-   * Also, DE-9IM row index of the exterior of the first geometry and column index of
-   *  the exterior of the second geometry. 
-   */
-  public final static int EXTERIOR = 2;
-
-  /**
-   *  Used for uninitialized location values.
-   */
-  public final static int NONE = -1;
-
-  /**
-   *  Converts the location value to a location symbol, for example, <code>EXTERIOR => 'e'</code>
-   *  .
-   *
-   *@param  locationValue  either EXTERIOR, BOUNDARY, INTERIOR or NONE
-   *@return                either 'e', 'b', 'i' or '-'
-   */
-  public static char toLocationSymbol(int locationValue) {
-    switch (locationValue) {
-      case EXTERIOR:
-        return 'e';
-      case BOUNDARY:
-        return 'b';
-      case INTERIOR:
-        return 'i';
-      case NONE:
-        return '-';
-    }
-    throw new IllegalArgumentException("Unknown location value: " + locationValue);
-  }
-}
-
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/MultiLineString.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/MultiLineString.java	(revision 28245)
+++ 	(revision )
@@ -1,127 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import com.vividsolutions.jts.operation.BoundaryOp;
-
-/**
- * Models a collection of (@link LineString}s.
- * <p>
- * Any collection of LineStrings is a valid MultiLineString.
- *
- *@version 1.7
- */
-public class MultiLineString 
-	extends GeometryCollection
-	implements Lineal
-	{
-  private static final long serialVersionUID = 8166665132445433741L;
-
-  /**
-   * @param lineStrings
-   *            the <code>LineString</code>s for this <code>MultiLineString</code>,
-   *            or <code>null</code> or an empty array to create the empty
-   *            geometry. Elements may be empty <code>LineString</code>s,
-   *            but not <code>null</code>s.
-   */
-  public MultiLineString(LineString[] lineStrings, GeometryFactory factory) {
-    super(lineStrings, factory);
-  }
-
-  public int getDimension() {
-    return 1;
-  }
-
-  public int getBoundaryDimension() {
-    if (isClosed()) {
-      return Dimension.FALSE;
-    }
-    return 0;
-  }
-
-  public String getGeometryType() {
-    return "MultiLineString";
-  }
-
-  public boolean isClosed() {
-    if (isEmpty()) {
-      return false;
-    }
-    for (int i = 0; i < geometries.length; i++) {
-      if (!((LineString) geometries[i]).isClosed()) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  /**
-   * Gets the boundary of this geometry.
-   * The boundary of a lineal geometry is always a zero-dimensional geometry (which may be empty).
-   *
-   * @return the boundary geometry
-   * @see Geometry#getBoundary
-   */
-  public Geometry getBoundary()
-  {
-    return (new BoundaryOp(this)).getBoundary();
-  }
-
-  /**
-   * Creates a {@link MultiLineString} in the reverse
-   * order to this object.
-   * Both the order of the component LineStrings
-   * and the order of their coordinate sequences
-   * are reversed.
-   *
-   * @return a {@link MultiLineString} in the reverse order
-   */
-  public Geometry reverse()
-  {
-    int nLines = geometries.length;
-    LineString[] revLines = new LineString[nLines];
-    for (int i = 0; i < geometries.length; i++) {
-      revLines[nLines - 1 - i] = (LineString)geometries[i].reverse();
-    }
-    return getFactory().createMultiLineString(revLines);
-  }
-
-  public boolean equalsExact(Geometry other, double tolerance) {
-    if (!isEquivalentClass(other)) {
-      return false;
-    }
-    return super.equalsExact(other, tolerance);
-  }
-
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/MultiPoint.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/MultiPoint.java	(revision 28245)
+++ 	(revision )
@@ -1,95 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-/**
- * Models a collection of {@link Point}s.
- * <p>
- * Any collection of Points is a valid MultiPoint.
- *
- *@version 1.7
- */
-public class MultiPoint
-  extends GeometryCollection
-  implements Puntal
-{
-
-  private static final long serialVersionUID = -8048474874175355449L;
-
-  /**
-   *@param  points          the <code>Point</code>s for this <code>MultiPoint</code>
-   *      , or <code>null</code> or an empty array to create the empty geometry.
-   *      Elements may be empty <code>Point</code>s, but not <code>null</code>s.
-   */
-  public MultiPoint(Point[] points, GeometryFactory factory) {
-    super(points, factory);
-  }
-
-  public int getDimension() {
-    return 0;
-  }
-
-  public int getBoundaryDimension() {
-    return Dimension.FALSE;
-  }
-
-  public String getGeometryType() {
-    return "MultiPoint";
-  }
-
-  /**
-   * Gets the boundary of this geometry.
-   * Zero-dimensional geometries have no boundary by definition,
-   * so an empty GeometryCollection is returned.
-   *
-   * @return an empty GeometryCollection
-   * @see Geometry#getBoundary
-   */
-  public Geometry getBoundary() {
-    return getFactory().createGeometryCollection(null);
-  }
-
-  public boolean isValid() {
-    return true;
-  }
-
-  public boolean equalsExact(Geometry other, double tolerance) {
-    if (!isEquivalentClass(other)) {
-      return false;
-    }
-    return super.equalsExact(other, tolerance);
-  }
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/MultiPolygon.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/MultiPolygon.java	(revision 28245)
+++ 	(revision )
@@ -1,134 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.util.ArrayList;
-
-/**
- * Models a collection of {@link Polygon}s.
- * <p>
- * As per the OGC SFS specification, 
- * the Polygons in a MultiPolygon may not overlap, 
- * and may only touch at single points.
- * This allows the topological point-set semantics
- * to be well-defined.
- *  
- *
- *@version 1.7
- */
-public class MultiPolygon 
-	extends GeometryCollection 
-	implements Polygonal
-{
-  private static final long serialVersionUID = -551033529766975875L;
-
-  /**
-   * @param polygons
-   *            the <code>Polygon</code>s for this <code>MultiPolygon</code>,
-   *            or <code>null</code> or an empty array to create the empty
-   *            geometry. Elements may be empty <code>Polygon</code>s, but
-   *            not <code>null</code>s. The polygons must conform to the
-   *            assertions specified in the <A
-   *            HREF="http://www.opengis.org/techno/specs.htm">OpenGIS Simple
-   *            Features Specification for SQL</A>.
-   */
-  public MultiPolygon(Polygon[] polygons, GeometryFactory factory) {
-    super(polygons, factory);
-  }
-
-  public int getDimension() {
-    return 2;
-  }
-
-  public int getBoundaryDimension() {
-    return 1;
-  }
-
-  public String getGeometryType() {
-    return "MultiPolygon";
-  }
-
-  public boolean isSimple() {
-    return true;
-  }
-
-  /**
-   * Computes the boundary of this geometry
-   *
-   * @return a lineal geometry (which may be empty)
-   * @see Geometry#getBoundary
-   */
-  public Geometry getBoundary() {
-    if (isEmpty()) {
-      return getFactory().createMultiLineString(null);
-    }
-    ArrayList allRings = new ArrayList();
-    for (int i = 0; i < geometries.length; i++) {
-      Polygon polygon = (Polygon) geometries[i];
-      Geometry rings = polygon.getBoundary();
-      for (int j = 0; j < rings.getNumGeometries(); j++) {
-        allRings.add(rings.getGeometryN(j));
-      }
-    }
-    LineString[] allRingsArray = new LineString[allRings.size()];
-    return getFactory().createMultiLineString((LineString[]) allRings.toArray(allRingsArray));
-  }
-
-  public boolean equalsExact(Geometry other, double tolerance) {
-    if (!isEquivalentClass(other)) {
-      return false;
-    }
-    return super.equalsExact(other, tolerance);
-  }
-  
-  /**
-   * Creates a {@link MultiPolygon} with
-   * every component reversed.
-   * The order of the components in the collection are not reversed.
-   *
-   * @return a MultiPolygon in the reverse order
-   */
-  public Geometry reverse()
-  {
-    int n = geometries.length;
-    Polygon[] revGeoms = new Polygon[n];
-    for (int i = 0; i < geometries.length; i++) {
-      revGeoms[i] = (Polygon) geometries[i].reverse();
-    }
-    return getFactory().createMultiPolygon(revGeoms);
-  }
-}
-
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Point.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Point.java	(revision 28245)
+++ 	(revision )
@@ -1,215 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import com.vividsolutions.jts.util.Assert;
-
-/**
- *  Implementation of <code>Point</code>.
- *
- * A Point is valid iff:
- * <ul>
- * <li>the coordinate which defines it is a valid coordinate (i.e does not have an NaN X or Y ordinate)
- * </ul>
- * 
- *@version 1.7
- */
-public class Point 
-	extends Geometry
-	implements Puntal
-{
-  private static final long serialVersionUID = 4902022702746614570L;
-  /**
-   *  The <code>Coordinate</code> wrapped by this <code>Point</code>.
-   */
-  private CoordinateSequence coordinates;
-
-  /**
-   *@param  coordinates      contains the single coordinate on which to base this <code>Point</code>
-   *      , or <code>null</code> to create the empty geometry.
-   */
-  public Point(CoordinateSequence coordinates, GeometryFactory factory) {
-    super(factory);
-    init(coordinates);
-  }
-
-  private void init(CoordinateSequence coordinates)
-  {
-    if (coordinates == null) {
-      coordinates = getFactory().getCoordinateSequenceFactory().create(new Coordinate[]{});
-    }
-    Assert.isTrue(coordinates.size() <= 1);
-    this.coordinates = coordinates;
-  }
-
-  public Coordinate[] getCoordinates() {
-    return isEmpty() ? new Coordinate[]{} : new Coordinate[]{
-        getCoordinate()
-        };
-  }
-
-  public int getNumPoints() {
-    return isEmpty() ? 0 : 1;
-  }
-
-  public boolean isEmpty() {
-    return getCoordinate() == null;
-  }
-
-  public boolean isSimple() {
-    return true;
-  }
-
-  public int getDimension() {
-    return 0;
-  }
-
-  public int getBoundaryDimension() {
-    return Dimension.FALSE;
-  }
-
-  public double getX() {
-    if (getCoordinate() == null) {
-      throw new IllegalStateException("getX called on empty Point");
-    }
-    return getCoordinate().x;
-  }
-
-  public double getY() {
-    if (getCoordinate() == null) {
-      throw new IllegalStateException("getY called on empty Point");
-    }
-    return getCoordinate().y;
-  }
-
-  public Coordinate getCoordinate() {
-    return coordinates.size() != 0 ? coordinates.getCoordinate(0): null;
-  }
-
-  public String getGeometryType() {
-    return "Point";
-  }
-
-  /**
-   * Gets the boundary of this geometry.
-   * Zero-dimensional geometries have no boundary by definition,
-   * so an empty GeometryCollection is returned.
-   *
-   * @return an empty GeometryCollection
-   * @see Geometry#getBoundary
-   */
-  public Geometry getBoundary() {
-    return getFactory().createGeometryCollection(null);
-  }
-
-  protected Envelope computeEnvelopeInternal() {
-    if (isEmpty()) {
-      return new Envelope();
-    }
-    Envelope env = new Envelope();
-    env.expandToInclude(coordinates.getX(0), coordinates.getY(0));
-    return env;
-  }
-
-  public boolean equalsExact(Geometry other, double tolerance) {
-    if (!isEquivalentClass(other)) {
-      return false;
-    }
-    if (isEmpty() && other.isEmpty()) {
-      return true;
-    }
-    return equal(((Point) other).getCoordinate(), this.getCoordinate(), tolerance);
-  }
-
-  public void apply(CoordinateFilter filter) {
-	    if (isEmpty()) { return; }
-	    filter.filter(getCoordinate());
-	  }
-
-  public void apply(CoordinateSequenceFilter filter) 
-  {
-	    if (isEmpty())
-        return;
-	    filter.filter(coordinates, 0);
-      if (filter.isGeometryChanged())
-        geometryChanged();
-	  }
-
-  public void apply(GeometryFilter filter) {
-    filter.filter(this);
-  }
-
-  public void apply(GeometryComponentFilter filter) {
-    filter.filter(this);
-  }
-
-  /**
-   * Creates and returns a full copy of this {@link Point} object.
-   * (including all coordinates contained by it).
-   *
-   * @return a clone of this instance
-   */
-  public Object clone() {
-    Point p = (Point) super.clone();
-    p.coordinates = (CoordinateSequence) coordinates.clone();
-    return p;// return the clone
-  }
-
-  public Geometry reverse()
-  {
-    return (Geometry) clone();
-  }
-  
-  public void normalize() 
-  { 
-    // a Point is always in normalized form 
-  }
-
-  protected int compareToSameClass(Object other) {
-    Point point = (Point) other;
-    return getCoordinate().compareTo(point.getCoordinate());
-  }
-
-  protected int compareToSameClass(Object other, CoordinateSequenceComparator comp)
-  {
-    Point point = (Point) other;
-    return comp.compare(this.coordinates, point.coordinates);
-  }
-
-  public CoordinateSequence getCoordinateSequence() {
-    return coordinates;
-  }
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Polygon.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Polygon.java	(revision 28245)
+++ 	(revision )
@@ -1,402 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.util.Arrays;
-
-import com.vividsolutions.jts.algorithm.CGAlgorithms;
-
-/**
- * Represents a linear polygon, which may include holes.
- * The shell and holes of the polygon are represented by {@link LinearRing}s.
- * In a valid polygon, holes may touch the shell or other holes at a single point.
- * However, no sequence of touching holes may split the polygon into two pieces.
- * The orientation of the rings in the polygon does not matter.
- * <p>
- *  The shell and holes must conform to the assertions specified in the <A
- *  HREF="http://www.opengis.org/techno/specs.htm">OpenGIS Simple Features
- *  Specification for SQL</A> .
- *
- *@version 1.7
- */
-public class Polygon 
-	extends Geometry
-	implements Polygonal
-{
-  private static final long serialVersionUID = -3494792200821764533L;
-
-  /**
-   *  The exterior boundary,
-   * or <code>null</code> if this <code>Polygon</code>
-   *  is empty.
-   */
-  protected LinearRing shell = null;
-
-  /**
-   * The interior boundaries, if any.
-   * This instance var is never null.
-   * If there are no holes, the array is of zero length.
-   */
-  protected LinearRing[] holes;
-
-  /**
-   *  Constructs a <code>Polygon</code> with the given exterior boundary and
-   *  interior boundaries.
-   *
-   *@param  shell           the outer boundary of the new <code>Polygon</code>,
-   *      or <code>null</code> or an empty <code>LinearRing</code> if the empty
-   *      geometry is to be created.
-   *@param  holes           the inner boundaries of the new <code>Polygon</code>
-   *      , or <code>null</code> or empty <code>LinearRing</code>s if the empty
-   *      geometry is to be created.
-   */
-  public Polygon(LinearRing shell, LinearRing[] holes, GeometryFactory factory) {
-    super(factory);
-    if (shell == null) {
-      shell = getFactory().createLinearRing((CoordinateSequence)null);
-    }
-    if (holes == null) {
-      holes = new LinearRing[]{};
-    }
-    if (hasNullElements(holes)) {
-      throw new IllegalArgumentException("holes must not contain null elements");
-    }
-    if (shell.isEmpty() && hasNonEmptyElements(holes)) {
-      throw new IllegalArgumentException("shell is empty but holes are not");
-    }
-    this.shell = shell;
-    this.holes = holes;
-  }
-
-  public Coordinate getCoordinate() {
-    return shell.getCoordinate();
-  }
-
-  public Coordinate[] getCoordinates() {
-    if (isEmpty()) {
-      return new Coordinate[]{};
-    }
-    Coordinate[] coordinates = new Coordinate[getNumPoints()];
-    int k = -1;
-    Coordinate[] shellCoordinates = shell.getCoordinates();
-    for (int x = 0; x < shellCoordinates.length; x++) {
-      k++;
-      coordinates[k] = shellCoordinates[x];
-    }
-    for (int i = 0; i < holes.length; i++) {
-      Coordinate[] childCoordinates = holes[i].getCoordinates();
-      for (int j = 0; j < childCoordinates.length; j++) {
-        k++;
-        coordinates[k] = childCoordinates[j];
-      }
-    }
-    return coordinates;
-  }
-
-  public int getNumPoints() {
-    int numPoints = shell.getNumPoints();
-    for (int i = 0; i < holes.length; i++) {
-      numPoints += holes[i].getNumPoints();
-    }
-    return numPoints;
-  }
-
-  public int getDimension() {
-    return 2;
-  }
-
-  public int getBoundaryDimension() {
-    return 1;
-  }
-
-  public boolean isEmpty() {
-    return shell.isEmpty();
-  }
-
-  /**
-   * Tests if a valid polygon is simple.
-   * This method always returns true, since a valid polygon is always simple
-   *
-   * @return <code>true</code>
-   */
-  public boolean isSimple() {
-    return true;
-  }
-
-  public boolean isRectangle()
-  {
-    if (getNumInteriorRing() != 0) return false;
-    if (shell == null) return false;
-    if (shell.getNumPoints() != 5) return false;
-
-    CoordinateSequence seq = shell.getCoordinateSequence();
-
-    // check vertices have correct values
-    Envelope env = getEnvelopeInternal();
-    for (int i = 0; i < 5; i++) {
-      double x = seq.getX(i);
-      if (! (x == env.getMinX() || x == env.getMaxX())) return false;
-      double y = seq.getY(i);
-      if (! (y == env.getMinY() || y == env.getMaxY())) return false;
-    }
-
-    // check vertices are in right order
-    double prevX = seq.getX(0);
-    double prevY = seq.getY(0);
-    for (int i = 1; i <= 4; i++) {
-      double x = seq.getX(i);
-      double y = seq.getY(i);
-      boolean xChanged = x != prevX;
-      boolean yChanged = y != prevY;
-      if (xChanged == yChanged)
-        return false;
-      prevX = x;
-      prevY = y;
-    }
-    return true;
-  }
-
-  public LineString getExteriorRing() {
-    return shell;
-  }
-
-  public int getNumInteriorRing() {
-    return holes.length;
-  }
-
-  public LineString getInteriorRingN(int n) {
-    return holes[n];
-  }
-
-  public String getGeometryType() {
-    return "Polygon";
-  }
-
-  /**
-   *  Returns the area of this <code>Polygon</code>
-   *
-   *@return the area of the polygon
-   */
-  public double getArea()
-  {
-    double area = 0.0;
-    area += Math.abs(CGAlgorithms.signedArea(shell.getCoordinateSequence()));
-    for (int i = 0; i < holes.length; i++) {
-      area -= Math.abs(CGAlgorithms.signedArea(holes[i].getCoordinateSequence()));
-    }
-    return area;
-  }
-
-  /**
-   *  Returns the perimeter of this <code>Polygon</code>
-   *
-   *@return the perimeter of the polygon
-   */
-  public double getLength()
-  {
-    double len = 0.0;
-    len += shell.getLength();
-    for (int i = 0; i < holes.length; i++) {
-      len += holes[i].getLength();
-    }
-    return len;
-  }
-
-  /**
-   * Computes the boundary of this geometry
-   *
-   * @return a lineal geometry (which may be empty)
-   * @see Geometry#getBoundary
-   */
-  public Geometry getBoundary() {
-    if (isEmpty()) {
-      return getFactory().createMultiLineString(null);
-    }
-    LinearRing[] rings = new LinearRing[holes.length + 1];
-    rings[0] = shell;
-    for (int i = 0; i < holes.length; i++) {
-      rings[i + 1] = holes[i];
-    }
-    // create LineString or MultiLineString as appropriate
-    if (rings.length <= 1)
-      return getFactory().createLinearRing(rings[0].getCoordinateSequence());
-    return getFactory().createMultiLineString(rings);
-  }
-
-  protected Envelope computeEnvelopeInternal() {
-    return shell.getEnvelopeInternal();
-  }
-
-  public boolean equalsExact(Geometry other, double tolerance) {
-    if (!isEquivalentClass(other)) {
-      return false;
-    }
-    Polygon otherPolygon = (Polygon) other;
-    Geometry thisShell = shell;
-    Geometry otherPolygonShell = otherPolygon.shell;
-    if (!thisShell.equalsExact(otherPolygonShell, tolerance)) {
-      return false;
-    }
-    if (holes.length != otherPolygon.holes.length) {
-      return false;
-    }
-    if (holes.length != otherPolygon.holes.length) {
-      return false;
-    }
-    for (int i = 0; i < holes.length; i++) {
-      if (!((Geometry) holes[i]).equalsExact(otherPolygon.holes[i], tolerance)) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  public void apply(CoordinateFilter filter) {
-	    shell.apply(filter);
-	    for (int i = 0; i < holes.length; i++) {
-	      holes[i].apply(filter);
-	    }
-	  }
-
-  public void apply(CoordinateSequenceFilter filter) 
-  {
-	    shell.apply(filter);
-      if (! filter.isDone()) {
-        for (int i = 0; i < holes.length; i++) {
-          holes[i].apply(filter);
-          if (filter.isDone()) 
-            break;
-        }
-      }
-      if (filter.isGeometryChanged())
-        geometryChanged();
-	  }
-
-  public void apply(GeometryFilter filter) {
-    filter.filter(this);
-  }
-
-  public void apply(GeometryComponentFilter filter) {
-    filter.filter(this);
-    shell.apply(filter);
-    for (int i = 0; i < holes.length; i++) {
-      holes[i].apply(filter);
-    }
-  }
-
-  /**
-   * Creates and returns a full copy of this {@link Polygon} object.
-   * (including all coordinates contained by it).
-   *
-   * @return a clone of this instance
-   */
-  public Object clone() {
-    Polygon poly = (Polygon) super.clone();
-    poly.shell = (LinearRing) shell.clone();
-    poly.holes = new LinearRing[holes.length];
-    for (int i = 0; i < holes.length; i++) {
-      poly.holes[i] = (LinearRing) holes[i].clone();
-    }
-    return poly;// return the clone
-  }
-
-  public Geometry convexHull() {
-    return getExteriorRing().convexHull();
-  }
-
-  public void normalize() {
-    normalize(shell, true);
-    for (int i = 0; i < holes.length; i++) {
-      normalize(holes[i], false);
-    }
-    Arrays.sort(holes);
-  }
-
-  protected int compareToSameClass(Object o) {
-    LinearRing thisShell = shell;
-    LinearRing otherShell = ((Polygon) o).shell;
-    return thisShell.compareToSameClass(otherShell);
-  }
-
-  protected int compareToSameClass(Object o, CoordinateSequenceComparator comp) {
-    Polygon poly = (Polygon) o;
-
-    LinearRing thisShell = shell;
-    LinearRing otherShell = poly.shell;
-    int shellComp = thisShell.compareToSameClass(otherShell, comp);
-    if (shellComp != 0) return shellComp;
-
-    int nHole1 = getNumInteriorRing();
-    int nHole2 = poly.getNumInteriorRing();
-    int i = 0;
-    while (i < nHole1 && i < nHole2) {
-      LinearRing thisHole = (LinearRing) getInteriorRingN(i);
-      LinearRing otherHole = (LinearRing) poly.getInteriorRingN(i);
-      int holeComp = thisHole.compareToSameClass(otherHole, comp);
-      if (holeComp != 0) return holeComp;
-      i++;
-    }
-    if (i < nHole1) return 1;
-    if (i < nHole2) return -1;
-    return 0;
-  }
-
-  private void normalize(LinearRing ring, boolean clockwise) {
-    if (ring.isEmpty()) {
-      return;
-    }
-    Coordinate[] uniqueCoordinates = new Coordinate[ring.getCoordinates().length - 1];
-    System.arraycopy(ring.getCoordinates(), 0, uniqueCoordinates, 0, uniqueCoordinates.length);
-    Coordinate minCoordinate = CoordinateArrays.minCoordinate(ring.getCoordinates());
-    CoordinateArrays.scroll(uniqueCoordinates, minCoordinate);
-    System.arraycopy(uniqueCoordinates, 0, ring.getCoordinates(), 0, uniqueCoordinates.length);
-    ring.getCoordinates()[uniqueCoordinates.length] = uniqueCoordinates[0];
-    if (CGAlgorithms.isCCW(ring.getCoordinates()) == clockwise) {
-      CoordinateArrays.reverse(ring.getCoordinates());
-    }
-  }
-
-  public Geometry reverse()
-  {
-    Polygon poly = (Polygon) super.clone();
-    poly.shell = (LinearRing) ((LinearRing) shell.clone()).reverse();
-    poly.holes = new LinearRing[holes.length];
-    for (int i = 0; i < holes.length; i++) {
-      poly.holes[i] = (LinearRing) ((LinearRing) holes[i].clone()).reverse();
-    }
-    return poly;// return the clone
-  }
-}
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Polygonal.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Polygonal.java	(revision 28245)
+++ 	(revision )
@@ -1,14 +1,0 @@
-package com.vividsolutions.jts.geom;
-
-/**
- * Identifies {@link Geometry} subclasses which
- * are 2-dimensional 
- * and have components which have {@link Lineal} boundaries. 
- * 
- * @author Martin Davis
- *
- */
-public interface Polygonal 
-{
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/PrecisionModel.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/PrecisionModel.java	(revision 28245)
+++ 	(revision )
@@ -1,311 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.vividsolutions.jts.io.WKTWriter;
-
-/**
- * Specifies the precision model of the {@link Coordinate}s in a {@link Geometry}.
- * In other words, specifies the grid of allowable
- *  points for all <code>Geometry</code>s.
- * <p>
- * The {@link #makePrecise(Coordinate)} method allows rounding a coordinate to
- * a "precise" value; that is, one whose
- *  precision is known exactly.
- *<p>
- * Coordinates are assumed to be precise in geometries.
- * That is, the coordinates are assumed to be rounded to the
- * precision model given for the geometry.
- * JTS input routines automatically round coordinates to the precision model
- * before creating Geometries.
- * All internal operations
- * assume that coordinates are rounded to the precision model.
- * Constructive methods (such as boolean operations) always round computed
- * coordinates to the appropriate precision model.
- * <p>
- * Currently three types of precision model are supported:
- * <ul>
- * <li>FLOATING - represents full double precision floating point.
- * This is the default precision model used in JTS
- * <li>FLOATING_SINGLE - represents single precision floating point.
- * <li>FIXED - represents a model with a fixed number of decimal places.
- *  A Fixed Precision Model is specified by a scale factor.
- *  The scale factor specifies the size of the grid which numbers are rounded to.
- *  Input coordinates are mapped to fixed coordinates according to the following
- *  equations:
- *    <UL>
- *      <LI> jtsPt.x = round( (inputPt.x * scale ) / scale
- *      <LI> jtsPt.y = round( (inputPt.y * scale ) / scale
- *    </UL>
- * </ul>
- * For example, to specify 3 decimal places of precision, use a scale factor
- * of 1000. To specify -3 decimal places of precision (i.e. rounding to
- * the nearest 1000), use a scale factor of 0.001.
- * <p>
- *  Coordinates are represented internally as Java double-precision values.
- * Since Java uses the IEEE-394 floating point standard, this
- *  provides 53 bits of precision. (Thus the maximum precisely representable
- *  integer is 9,007,199,254,740,992).
- *<p>
- *  JTS methods currently do not handle inputs with different precision models.
- *
- *@version 1.7
- */
-public class PrecisionModel implements Serializable, Comparable<PrecisionModel>
-{
-
-  private static final long serialVersionUID = 7777263578777803835L;
-
-  /**
-   * The types of Precision Model which JTS supports.
-   */
-  public static class Type
-      implements Serializable
-  {
-    private static final long serialVersionUID = -5528602631731589822L;
-    private static Map<String, Type> nameToTypeMap = new HashMap<String, Type>();
-    public Type(String name) {
-        this.name = name;
-        nameToTypeMap.put(name, this);
-    }
-    private String name;
-    public String toString() { return name; }
-    
-    
-    /*
-     * Ssee http://www.javaworld.com/javaworld/javatips/jw-javatip122.html
-     */
-    private Object readResolve() {
-        return nameToTypeMap.get(name);
-    }
-  }
-
-  /**
-   * Fixed Precision indicates that coordinates have a fixed number of decimal places.
-   * The number of decimal places is determined by the log10 of the scale factor.
-   */
-  public static final Type FIXED = new Type("FIXED");
-  /**
-   * Floating precision corresponds to the standard Java
-   * double-precision floating-point representation, which is
-   * based on the IEEE-754 standard
-   */
-  public static final Type FLOATING = new Type("FLOATING");
-  /**
-   * Floating single precision corresponds to the standard Java
-   * single-precision floating-point representation, which is
-   * based on the IEEE-754 standard
-   */
-  public static final Type FLOATING_SINGLE = new Type("FLOATING SINGLE");
-
-  /**
-   * The type of PrecisionModel this represents.
-   */
-  private Type modelType;
-  /**
-   * The scale factor which determines the number of decimal places in fixed precision.
-   */
-  private double scale;
-
-  /**
-   * Creates a <code>PrecisionModel</code> with a default precision
-   * of FLOATING.
-   */
-  public PrecisionModel() {
-    // default is floating precision
-    modelType = FLOATING;
-  }
-
-  /**
-   * Returns the maximum number of significant digits provided by this
-   * precision model.
-   * Intended for use by routines which need to print out 
-   * decimal representations of precise values (such as {@link WKTWriter}).
-   * <p>
-   * This method would be more correctly called
-   * <tt>getMinimumDecimalPlaces</tt>, 
-   * since it actually computes the number of decimal places
-   * that is required to correctly display the full
-   * precision of an ordinate value.
-   * <p>
-   * Since it is difficult to compute the required number of
-   * decimal places for scale factors which are not powers of 10,
-   * the algorithm uses a very rough approximation in this case.
-   * This has the side effect that for scale factors which are
-   * powers of 10 the value returned is 1 greater than the true value.
-   * 
-   *
-   * @return the maximum number of decimal places provided by this precision model
-   */
-  public int getMaximumSignificantDigits() {
-    int maxSigDigits = 16;
-    if (modelType == FLOATING) {
-      maxSigDigits = 16;
-    } else if (modelType == FLOATING_SINGLE) {
-      maxSigDigits = 6;
-    } else if (modelType == FIXED) {
-      maxSigDigits = 1 + (int) Math.ceil(Math.log(getScale()) / Math.log(10));
-    }
-    return maxSigDigits;
-  }
-
-  /**
-   * Returns the scale factor used to specify a fixed precision model.
-   * The number of decimal places of precision is 
-   * equal to the base-10 logarithm of the scale factor.
-   * Non-integral and negative scale factors are supported.
-   * Negative scale factors indicate that the places 
-   * of precision is to the left of the decimal point.  
-   *
-   *@return the scale factor for the fixed precision model
-   */
-  public double getScale() {
-    return scale;
-  }
-
-  /**
-   * Gets the type of this precision model
-   * @return the type of this precision model
-   * @see Type
-   */
-  public Type getType()
-  {
-    return modelType;
-  }
-
-  /**
-   * Rounds a numeric value to the PrecisionModel grid.
-   * Asymmetric Arithmetic Rounding is used, to provide
-   * uniform rounding behaviour no matter where the number is
-   * on the number line.
-   * <p>
-   * This method has no effect on NaN values.
-   * <p>
-   * <b>Note:</b> Java's <code>Math#rint</code> uses the "Banker's Rounding" algorithm,
-   * which is not suitable for precision operations elsewhere in JTS.
-   */
-  public double makePrecise(double val) 
-  {
-  	// don't change NaN values
-  	if (Double.isNaN(val)) return val;
-  	
-  	if (modelType == FLOATING_SINGLE) {
-  		float floatSingleVal = (float) val;
-  		return floatSingleVal;
-  	}
-  	if (modelType == FIXED) {
-            return Math.round(val * scale) / scale;
-//  		return Math.rint(val * scale) / scale;
-  	}
-  	// modelType == FLOATING - no rounding necessary
-  	return val;
-  }
-
-  /**
-   * Rounds a Coordinate to the PrecisionModel grid.
-   */
-  public void makePrecise(Coordinate coord)
-  {
-    // optimization for full precision
-    if (modelType == FLOATING) return;
-
-    coord.x = makePrecise(coord.x);
-    coord.y = makePrecise(coord.y);
-    //MD says it's OK that we're not makePrecise'ing the z [Jon Aquino]
-  }
-
-
-  public String toString() {
-  	String description = "UNKNOWN";
-  	if (modelType == FLOATING) {
-  		description = "Floating";
-  	} else if (modelType == FLOATING_SINGLE) {
-  		description = "Floating-Single";
-  	} else if (modelType == FIXED) {
-  		description = "Fixed (Scale=" + getScale() + ")";
-  	}
-  	return description;
-  }
-
-  public boolean equals(Object other) {
-    if (! (other instanceof PrecisionModel)) {
-      return false;
-    }
-    PrecisionModel otherPrecisionModel = (PrecisionModel) other;
-    return modelType == otherPrecisionModel.modelType
-        && scale == otherPrecisionModel.scale;
-  }
-  /**
-   *  Compares this {@link PrecisionModel} object with the specified object for order.
-   * A PrecisionModel is greater than another if it provides greater precision.
-   * The comparison is based on the value returned by the
-   * {@link #getMaximumSignificantDigits} method.
-   * This comparison is not strictly accurate when comparing floating precision models
-   * to fixed models; however, it is correct when both models are either floating or fixed.
-   *
-   *@param  o  the <code>PrecisionModel</code> with which this <code>PrecisionModel</code>
-   *      is being compared
-   *@return    a negative integer, zero, or a positive integer as this <code>PrecisionModel</code>
-   *      is less than, equal to, or greater than the specified <code>PrecisionModel</code>
-   */
-  public int compareTo(PrecisionModel o) {
-
-    int sigDigits = getMaximumSignificantDigits();
-    int otherSigDigits = o.getMaximumSignificantDigits();
-    return (new Integer(sigDigits)).compareTo(new Integer(otherSigDigits));
-//    if (sigDigits > otherSigDigits)
-//      return 1;
-//    else if
-//    if (modelType == FLOATING && other.modelType == FLOATING) return 0;
-//    if (modelType == FLOATING && other.modelType != FLOATING) return 1;
-//    if (modelType != FLOATING && other.modelType == FLOATING) return -1;
-//    if (modelType == FIXED && other.modelType == FIXED) {
-//      if (scale > other.scale)
-//        return 1;
-//      else if (scale < other.scale)
-//        return -1;
-//      else
-//        return 0;
-//    }
-//    Assert.shouldNeverReachHere("Unknown Precision Model type encountered");
-//    return 0;
-  }
-}
-
-
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Puntal.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/Puntal.java	(revision 28245)
+++ 	(revision )
@@ -1,12 +1,0 @@
-package com.vividsolutions.jts.geom;
-
-/**
- * Identifies {@link Geometry} subclasses which
- * are 0-dimensional and with components which are {@link Point}s. 
- * 
- * @author Martin Davis
- *
- */
-public interface Puntal {
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/TopologyException.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/TopologyException.java	(revision 28245)
+++ 	(revision )
@@ -1,63 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geom;
-
-/**
- * Indicates an invalid or inconsistent topological situation encountered during processing
- *
- * @version 1.7
- */
-public class TopologyException
-  extends RuntimeException
-{
-  private static String msgWithCoord(String msg, Coordinate pt)
-  {
-    if (pt != null)
-      return msg + " [ " + pt + " ]";
-    return msg;
-  }
-
-  public TopologyException(String msg)
-  {
-    super(msg);
-  }
-
-  public TopologyException(String msg, Coordinate pt)
-  {
-    super(msgWithCoord(msg, pt));
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/package.html
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geom/package.html	(revision 28245)
+++ 	(revision )
@@ -1,25 +1,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
-
--->
-</head>
-<body bgcolor="white">
-
-Contains the <CODE>Geometry</CODE> interface hierarchy and supporting classes.
-<P>
-The Java Topology Suite (JTS) is a Java API that implements a core set of spatial data operations using an explicit precision model and robust geometric algorithms. JTS is intended to be used in the development of applications that support the validation, cleaning, integration and querying of spatial datasets.
-<P>
-JTS attempts to implement the OpenGIS Simple Features Specification (SFS) as accurately as possible.  In some cases the SFS is unclear or omits a specification; in this case JTS attempts to choose a reasonable and consistent alternative.  Differences from and elaborations of the SFS are documented in this specification.
-
-<h2>Package Specification</h2>
-
-<ul>
-  <li>Java Topology Suite Technical Specifications
-  <li><A HREF="http://www.opengis.org/techno/specs.htm">
-      OpenGIS Simple Features Specification for SQL</A>
-</ul>
-
-</body>
-</html>
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/Depth.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/Depth.java	(revision 28245)
+++ 	(revision )
@@ -1,146 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import com.vividsolutions.jts.geom.Location;
-
-/**
- * A Depth object records the topological depth of the sides
- * of an Edge for up to two Geometries.
- * @version 1.7
- */
-public class Depth {
-
-  private final static int NULL_VALUE = -1;
-
-  public static int depthAtLocation(int location)
-  {
-    if (location == Location.EXTERIOR) return 0;
-    if (location == Location.INTERIOR) return 1;
-    return NULL_VALUE;
-  }
-
-  private int[][] depth = new int[2][3];
-
-  public Depth() {
-    // initialize depth array to a sentinel value
-    for (int i = 0; i < 2; i++) {
-      for (int j = 0; j < 3; j++) {
-        depth[i][j] = NULL_VALUE;
-      }
-    }
-  }
-
-  public int getLocation(int geomIndex, int posIndex)
-  {
-    if (depth[geomIndex][posIndex] <= 0) return Location.EXTERIOR;
-    return Location.INTERIOR;
-  }
-
-  /**
-   * A Depth object is null (has never been initialized) if all depths are null.
-   */
-  public boolean isNull()
-  {
-    for (int i = 0; i < 2; i++) {
-      for (int j = 0; j < 3; j++) {
-        if (depth[i][j] != NULL_VALUE)
-          return false;
-      }
-    }
-    return true;
-  }
-  public boolean isNull(int geomIndex)
-  {
-    return depth[geomIndex][1] == NULL_VALUE;
-  }
-  public boolean isNull(int geomIndex, int posIndex)
-  {
-    return depth[geomIndex][posIndex] == NULL_VALUE;
-  }
-  public void add(Label lbl)
-  {
-    for (int i = 0; i < 2; i++) {
-      for (int j = 1; j < 3; j++) {
-        int loc = lbl.getLocation(i, j);
-        if (loc == Location.EXTERIOR || loc == Location.INTERIOR) {
-          // initialize depth if it is null, otherwise add this location value
-          if (isNull(i, j)) {
-            depth[i][j] = depthAtLocation(loc);
-          }
-          else
-            depth[i][j] += depthAtLocation(loc);
-        }
-      }
-    }
-  }
-  public int getDelta(int geomIndex)
-  {
-    return depth[geomIndex][Position.RIGHT] - depth[geomIndex][Position.LEFT];
-  }
-  /**
-   * Normalize the depths for each geometry, if they are non-null.
-   * A normalized depth
-   * has depth values in the set { 0, 1 }.
-   * Normalizing the depths
-   * involves reducing the depths by the same amount so that at least
-   * one of them is 0.  If the remaining value is > 0, it is set to 1.
-   */
-  public void normalize()
-  {
-    for (int i = 0; i < 2; i++) {
-      if (! isNull(i)) {
-        int minDepth = depth[i][1];
-        if (depth[i][2] < minDepth)
-          minDepth = depth[i][2];
-
-        if (minDepth < 0) minDepth = 0;
-        for (int j = 1; j < 3; j++) {
-          int newValue = 0;
-          if (depth[i][j] > minDepth)
-            newValue = 1;
-          depth[i][j] = newValue;
-        }
-      }
-    }
-  }
-
-  public String toString()
-  {
-    return
-        "A: " + depth[0][1] + "," + depth[0][2]
-      + " B: " + depth[1][1] + "," + depth[1][2];
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/DirectedEdge.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/DirectedEdge.java	(revision 28245)
+++ 	(revision )
@@ -1,183 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import java.io.PrintStream;
-
-import com.vividsolutions.jts.geom.Location;
-
-
-/**
- * @version 1.7
- */
-public class DirectedEdge
-  extends EdgeEnd
-{
-
-
-  protected boolean isForward;
-  private boolean isInResult = false;
-  private boolean isVisited = false;
-
-  private DirectedEdge sym; // the symmetric edge
-  private DirectedEdge next;  // the next edge in the edge ring for the polygon containing this edge
-  private DirectedEdge nextMin;  // the next edge in the MinimalEdgeRing that contains this edge
-  private EdgeRing edgeRing;  // the EdgeRing that this edge is part of
-  private EdgeRing minEdgeRing;  // the MinimalEdgeRing that this edge is part of
-  /**
-   * The depth of each side (position) of this edge.
-   * The 0 element of the array is never used.
-   */
-  private int[] depth = { 0, -999, -999 };
-
-  public DirectedEdge(Edge edge, boolean isForward)
-  {
-    super(edge);
-    this.isForward = isForward;
-    if (isForward) {
-      init(edge.getCoordinate(0), edge.getCoordinate(1));
-    }
-    else {
-      int n = edge.getNumPoints() - 1;
-      init(edge.getCoordinate(n), edge.getCoordinate(n-1));
-    }
-    computeDirectedLabel();
-  }
-  public Edge getEdge() { return edge; }
-  public void setInResult(boolean isInResult) { this.isInResult = isInResult; }
-  public boolean isInResult() { return isInResult; }
-  public boolean isVisited() { return isVisited; }
-  public void setVisited(boolean isVisited) { this.isVisited = isVisited; }
-  public void setEdgeRing(EdgeRing edgeRing) { this.edgeRing = edgeRing; }
-  public EdgeRing getEdgeRing() { return edgeRing; }
-  public void setMinEdgeRing(EdgeRing minEdgeRing) { this.minEdgeRing = minEdgeRing; }
-  public EdgeRing getMinEdgeRing() { return minEdgeRing; }
-
-
-  public int getDepthDelta()
-  {
-    int depthDelta = edge.getDepthDelta();
-    if (! isForward) depthDelta = -depthDelta;
-    return depthDelta;
-  }
-
-  /**
-   * setVisitedEdge marks both DirectedEdges attached to a given Edge.
-   * This is used for edges corresponding to lines, which will only
-   * appear oriented in a single direction in the result.
-   */
-  public void setVisitedEdge(boolean isVisited)
-  {
-    setVisited(isVisited);
-    sym.setVisited(isVisited);
-  }
-  /**
-   * Each Edge gives rise to a pair of symmetric DirectedEdges, in opposite
-   * directions.
-   * @return the DirectedEdge for the same Edge but in the opposite direction
-   */
-  public DirectedEdge getSym() { return sym; }
-  public boolean isForward() { return isForward; }
-  public void setSym(DirectedEdge de)
-  {
-    sym = de;
-  }
-  public DirectedEdge getNext() { return next; }
-  public void setNext(DirectedEdge next) { this.next = next; }
-  public DirectedEdge getNextMin() { return nextMin; }
-  public void setNextMin(DirectedEdge nextMin) { this.nextMin = nextMin; }
-
-  /**
-   * This edge is a line edge if
-   * <ul>
-   * <li> at least one of the labels is a line label
-   * <li> any labels which are not line labels have all Locations = EXTERIOR
-   * </ul>
-   */
-  public boolean isLineEdge()
-  {
-    boolean isLine = label.isLine(0) || label.isLine(1);
-    boolean isExteriorIfArea0 =
-      ! label.isArea(0) || label.allPositionsEqual(0, Location.EXTERIOR);
-    boolean isExteriorIfArea1 =
-      ! label.isArea(1) || label.allPositionsEqual(1, Location.EXTERIOR);
-
-    return isLine && isExteriorIfArea0 && isExteriorIfArea1;
-  }
-  /**
-   * This is an interior Area edge if
-   * <ul>
-   * <li> its label is an Area label for both Geometries
-   * <li> and for each Geometry both sides are in the interior.
-   * </ul>
-   *
-   * @return true if this is an interior Area edge
-   */
-  public boolean isInteriorAreaEdge()
-  {
-    boolean isInteriorAreaEdge = true;
-    for (int i = 0; i < 2; i++) {
-      if (! ( label.isArea(i)
-            && label.getLocation(i, Position.LEFT ) == Location.INTERIOR
-            && label.getLocation(i, Position.RIGHT) == Location.INTERIOR) ) {
-        isInteriorAreaEdge = false;
-      }
-    }
-    return isInteriorAreaEdge;
-  }
-
-  /**
-   * Compute the label in the appropriate orientation for this DirEdge
-   */
-  private void computeDirectedLabel()
-  {
-    label = new Label(edge.getLabel());
-    if (! isForward)
-      label.flip();
-  }
-
-
-  public void print(PrintStream out)
-  {
-    super.print(out);
-    out.print(" " + depth[Position.LEFT] + "/" + depth[Position.RIGHT]);
-    out.print(" (" + getDepthDelta() + ")");
-    //out.print(" " + this.hashCode());
-    //if (next != null) out.print(" next:" + next.hashCode());
-    if (isInResult) out.print(" inResult");
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/DirectedEdgeStar.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/DirectedEdgeStar.java	(revision 28245)
+++ 	(revision )
@@ -1,322 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import com.vividsolutions.jts.geom.Location;
-import com.vividsolutions.jts.geom.TopologyException;
-import com.vividsolutions.jts.util.Assert;
-
-/**
- * A DirectedEdgeStar is an ordered list of <b>outgoing</b> DirectedEdges around a node.
- * It supports labelling the edges as well as linking the edges to form both
- * MaximalEdgeRings and MinimalEdgeRings.
- *
- * @version 1.7
- */
-public class DirectedEdgeStar
-  extends EdgeEndStar
-{
-
-  /**
-   * A list of all outgoing edges in the result, in CCW order
-   */
-  private List resultAreaEdgeList;
-  private Label label;
-
-  public DirectedEdgeStar() {
-  }
-  /**
-   * Insert a directed edge in the list
-   */
-  public void insert(EdgeEnd ee)
-  {
-    DirectedEdge de = (DirectedEdge) ee;
-    insertEdgeEnd(de, de);
-  }
-
-  public Label getLabel() { return label; }
-
-  public int getOutgoingDegree(EdgeRing er)
-  {
-    int degree = 0;
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      DirectedEdge de = (DirectedEdge) it.next();
-      if (de.getEdgeRing() == er) degree++;
-    }
-    return degree;
-  }
-
-  /**
-   * Compute the labelling for all dirEdges in this star, as well
-   * as the overall labelling
-   */
-  public void computeLabelling(GeometryGraph[] geom)
-  {
-//Debug.print(this);
-    super.computeLabelling(geom);
-
-    // determine the overall labelling for this DirectedEdgeStar
-    // (i.e. for the node it is based at)
-    label = new Label(Location.NONE);
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      EdgeEnd ee = (EdgeEnd) it.next();
-      Edge e = ee.getEdge();
-      Label eLabel = e.getLabel();
-      for (int i = 0; i < 2; i++) {
-        int eLoc = eLabel.getLocation(i);
-        if (eLoc == Location.INTERIOR || eLoc == Location.BOUNDARY)
-          label.setLocation(i, Location.INTERIOR);
-      }
-    }
-//Debug.print(this);
-  }
-
-  /**
-   * For each dirEdge in the star,
-   * merge the label from the sym dirEdge into the label
-   */
-  public void mergeSymLabels()
-  {
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      DirectedEdge de = (DirectedEdge) it.next();
-      Label label = de.getLabel();
-      label.merge(de.getSym().getLabel());
-    }
-  }
-
-  /**
-   * Update incomplete dirEdge labels from the labelling for the node
-   */
-  public void updateLabelling(Label nodeLabel)
-  {
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      DirectedEdge de = (DirectedEdge) it.next();
-      Label label = de.getLabel();
-      label.setAllLocationsIfNull(0, nodeLabel.getLocation(0));
-      label.setAllLocationsIfNull(1, nodeLabel.getLocation(1));
-    }
-  }
-
-  private List getResultAreaEdges()
-  {
-//print(System.out);
-    if (resultAreaEdgeList != null) return resultAreaEdgeList;
-    resultAreaEdgeList = new ArrayList();
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      DirectedEdge de = (DirectedEdge) it.next();
-      if (de.isInResult() || de.getSym().isInResult() )
-        resultAreaEdgeList.add(de);
-    }
-    return resultAreaEdgeList;
-  }
-
-  private final int SCANNING_FOR_INCOMING = 1;
-  private final int LINKING_TO_OUTGOING = 2;
-  /**
-   * Traverse the star of DirectedEdges, linking the included edges together.
-   * To link two dirEdges, the <next> pointer for an incoming dirEdge
-   * is set to the next outgoing edge.
-   * <p>
-   * DirEdges are only linked if:
-   * <ul>
-   * <li>they belong to an area (i.e. they have sides)
-   * <li>they are marked as being in the result
-   * </ul>
-   * <p>
-   * Edges are linked in CCW order (the order they are stored).
-   * This means that rings have their face on the Right
-   * (in other words,
-   * the topological location of the face is given by the RHS label of the DirectedEdge)
-   * <p>
-   * PRECONDITION: No pair of dirEdges are both marked as being in the result
-   */
-  public void linkResultDirectedEdges()
-  {
-    // make sure edges are copied to resultAreaEdges list
-    getResultAreaEdges();
-    // find first area edge (if any) to start linking at
-    DirectedEdge firstOut = null;
-    DirectedEdge incoming = null;
-    int state = SCANNING_FOR_INCOMING;
-    // link edges in CCW order
-    for (int i = 0; i < resultAreaEdgeList.size(); i++) {
-      DirectedEdge nextOut = (DirectedEdge) resultAreaEdgeList.get(i);
-      DirectedEdge nextIn = nextOut.getSym();
-
-      // skip de's that we're not interested in
-      if (! nextOut.getLabel().isArea()) continue;
-
-      // record first outgoing edge, in order to link the last incoming edge
-      if (firstOut == null && nextOut.isInResult()) firstOut = nextOut;
-      // assert: sym.isInResult() == false, since pairs of dirEdges should have been removed already
-
-      switch (state) {
-      case SCANNING_FOR_INCOMING:
-        if (! nextIn.isInResult()) continue;
-        incoming = nextIn;
-        state = LINKING_TO_OUTGOING;
-        break;
-      case LINKING_TO_OUTGOING:
-        if (! nextOut.isInResult()) continue;
-        incoming.setNext(nextOut);
-        state = SCANNING_FOR_INCOMING;
-        break;
-      }
-    }
-//Debug.print(this);
-    if (state == LINKING_TO_OUTGOING) {
-//Debug.print(firstOut == null, this);
-      if (firstOut == null)
-        throw new TopologyException("no outgoing dirEdge found", getCoordinate());
-      //Assert.isTrue(firstOut != null, "no outgoing dirEdge found (at " + getCoordinate() );
-      Assert.isTrue(firstOut.isInResult(), "unable to link last incoming dirEdge");
-      incoming.setNext(firstOut);
-    }
-  }
-  public void linkMinimalDirectedEdges(EdgeRing er)
-  {
-    // find first area edge (if any) to start linking at
-    DirectedEdge firstOut = null;
-    DirectedEdge incoming = null;
-    int state = SCANNING_FOR_INCOMING;
-    // link edges in CW order
-    for (int i = resultAreaEdgeList.size() - 1; i >= 0; i--) {
-      DirectedEdge nextOut = (DirectedEdge) resultAreaEdgeList.get(i);
-      DirectedEdge nextIn = nextOut.getSym();
-
-      // record first outgoing edge, in order to link the last incoming edge
-      if (firstOut == null && nextOut.getEdgeRing() == er) firstOut = nextOut;
-
-      switch (state) {
-      case SCANNING_FOR_INCOMING:
-        if (nextIn.getEdgeRing() != er) continue;
-        incoming = nextIn;
-        state = LINKING_TO_OUTGOING;
-        break;
-      case LINKING_TO_OUTGOING:
-        if (nextOut.getEdgeRing() != er) continue;
-        incoming.setNextMin(nextOut);
-        state = SCANNING_FOR_INCOMING;
-        break;
-      }
-    }
-//print(System.out);
-    if (state == LINKING_TO_OUTGOING) {
-      Assert.isTrue(firstOut != null, "found null for first outgoing dirEdge");
-      Assert.isTrue(firstOut.getEdgeRing() == er, "unable to link last incoming dirEdge");
-      incoming.setNextMin(firstOut);
-    }
-  }
-
-  /**
-   * Traverse the star of edges, maintaing the current location in the result
-   * area at this node (if any).
-   * If any L edges are found in the interior of the result, mark them as covered.
-   */
-  public void findCoveredLineEdges()
-  {
-//Debug.print("findCoveredLineEdges");
-//Debug.print(this);
-    // Since edges are stored in CCW order around the node,
-    // as we move around the ring we move from the right to the left side of the edge
-
-    /**
-     * Find first DirectedEdge of result area (if any).
-     * The interior of the result is on the RHS of the edge,
-     * so the start location will be:
-     * - INTERIOR if the edge is outgoing
-     * - EXTERIOR if the edge is incoming
-     */
-    int startLoc = Location.NONE ;
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      DirectedEdge nextOut  = (DirectedEdge) it.next();
-      DirectedEdge nextIn   = nextOut.getSym();
-      if (! nextOut.isLineEdge()) {
-        if (nextOut.isInResult()) {
-          startLoc = Location.INTERIOR;
-          break;
-        }
-        if (nextIn.isInResult()) {
-          startLoc = Location.EXTERIOR;
-          break;
-        }
-      }
-    }
-    // no A edges found, so can't determine if L edges are covered or not
-    if (startLoc == Location.NONE) return;
-
-    /**
-     * move around ring, keeping track of the current location
-     * (Interior or Exterior) for the result area.
-     * If L edges are found, mark them as covered if they are in the interior
-     */
-    int currLoc = startLoc;
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      DirectedEdge nextOut  = (DirectedEdge) it.next();
-      DirectedEdge nextIn   = nextOut.getSym();
-      if (nextOut.isLineEdge()) {
-        nextOut.getEdge().setCovered(currLoc == Location.INTERIOR);
-//Debug.println(nextOut);
-      }
-      else {  // edge is an Area edge
-        if (nextOut.isInResult())
-          currLoc = Location.EXTERIOR;
-        if (nextIn.isInResult())
-          currLoc = Location.INTERIOR;
-      }
-    }
-  }
-
-
-  public void print(PrintStream out)
-  {
-    System.out.println("DirectedEdgeStar: " + getCoordinate());
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      DirectedEdge de = (DirectedEdge) it.next();
-      out.print("out ");
-      de.print(out);
-      out.println();
-      out.print("in ");
-      de.getSym().print(out);
-      out.println();
-    }
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/Edge.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/Edge.java	(revision 28245)
+++ 	(revision )
@@ -1,239 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import com.vividsolutions.jts.algorithm.LineIntersector;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.IntersectionMatrix;
-import com.vividsolutions.jts.geomgraph.index.MonotoneChainEdge;
-
-
-/**
- * @version 1.7
- */
-public class Edge
-  extends GraphComponent
-{
-
-  /**
-   * Updates an IM from the label for an edge.
-   * Handles edges from both L and A geometries.
-   */
-  public static void updateIM(Label label, IntersectionMatrix im)
-  {
-    im.setAtLeastIfValid(label.getLocation(0, Position.ON), label.getLocation(1, Position.ON), 1);
-    if (label.isArea()) {
-      im.setAtLeastIfValid(label.getLocation(0, Position.LEFT),  label.getLocation(1, Position.LEFT),   2);
-      im.setAtLeastIfValid(label.getLocation(0, Position.RIGHT), label.getLocation(1, Position.RIGHT),  2);
-    }
-  }
-
-  Coordinate[] pts;
-  EdgeIntersectionList eiList = new EdgeIntersectionList(this);
-  private MonotoneChainEdge mce;
-  private boolean isIsolated = true;
-  private Depth depth = new Depth();
-  private int depthDelta = 0;   // the change in area depth from the R to L side of this edge
-
-  public Edge(Coordinate[] pts, Label label)
-  {
-    this.pts = pts;
-    this.label = label;
-  }
-
-  public int getNumPoints() { return pts.length; }
-  public Coordinate[] getCoordinates()  {    return pts;  }
-  public Coordinate getCoordinate(int i)
-  {
-    return pts[i];
-  }
-  public Coordinate getCoordinate()
-  {
-    if (pts.length > 0) return pts[0];
-    return null;
-  }
-
-  public Depth getDepth() { return depth; }
-
-  /**
-   * The depthDelta is the change in depth as an edge is crossed from R to L
-   * @return the change in depth as the edge is crossed from R to L
-   */
-  public int getDepthDelta()  { return depthDelta;  }
-
-  public int getMaximumSegmentIndex()
-  {
-    return pts.length - 1;
-  }
-  public EdgeIntersectionList getEdgeIntersectionList() { return eiList; }
-
-  public MonotoneChainEdge getMonotoneChainEdge()
-  {
-    if (mce == null) mce = new MonotoneChainEdge(this);
-    return mce;
-  }
-
-  public boolean isClosed()
-  {
-    return pts[0].equals(pts[pts.length - 1]);
-  }
-  /**
-   * An Edge is collapsed if it is an Area edge and it consists of
-   * two segments which are equal and opposite (eg a zero-width V).
-   */
-  public boolean isCollapsed()
-  {
-    if (! label.isArea()) return false;
-    if (pts.length != 3) return false;
-    if (pts[0].equals(pts[2]) ) return true;
-    return false;
-  }
-  public Edge getCollapsedEdge()
-  {
-    Coordinate newPts[] = new Coordinate[2];
-    newPts[0] = pts[0];
-    newPts[1] = pts[1];
-    Edge newe = new Edge(newPts, Label.toLineLabel(label));
-    return newe;
-  }
-
-  public void setIsolated(boolean isIsolated)
-  {
-    this.isIsolated = isIsolated;
-  }
-  public boolean isIsolated()
-  {
-    return isIsolated;
-  }
-
-  /**
-   * Adds EdgeIntersections for one or both
-   * intersections found for a segment of an edge to the edge intersection list.
-   */
-  public void addIntersections(LineIntersector li, int segmentIndex, int geomIndex)
-  {
-    for (int i = 0; i < li.getIntersectionNum(); i++) {
-      addIntersection(li, segmentIndex, geomIndex, i);
-    }
-  }
-  /**
-   * Add an EdgeIntersection for intersection intIndex.
-   * An intersection that falls exactly on a vertex of the edge is normalized
-   * to use the higher of the two possible segmentIndexes
-   */
-  public void addIntersection(LineIntersector li, int segmentIndex, int geomIndex, int intIndex)
-  {
-      Coordinate intPt = new Coordinate(li.getIntersection(intIndex));
-      int normalizedSegmentIndex = segmentIndex;
-      double dist = li.getEdgeDistance(geomIndex, intIndex);
-//Debug.println("edge intpt: " + intPt + " dist: " + dist);
-      // normalize the intersection point location
-      int nextSegIndex = normalizedSegmentIndex + 1;
-      if (nextSegIndex < pts.length) {
-        Coordinate nextPt = pts[nextSegIndex];
-//Debug.println("next pt: " + nextPt);
-
-        // Normalize segment index if intPt falls on vertex
-        // The check for point equality is 2D only - Z values are ignored
-        if (intPt.equals2D(nextPt)) {
-//Debug.println("normalized distance");
-            normalizedSegmentIndex = nextSegIndex;
-            dist = 0.0;
-        }
-      }
-      /**
-      * Add the intersection point to edge intersection list.
-      */
-      /*EdgeIntersection ei =*/ eiList.add(intPt, normalizedSegmentIndex, dist);
-//ei.print(System.out);
-
-  }
-
-  /**
-   * Update the IM with the contribution for this component.
-   * A component only contributes if it has a labelling for both parent geometries
-   */
-  public void computeIM(IntersectionMatrix im)
-  {
-    updateIM(label, im);
-  }
-
-  /**
-   * equals is defined to be:
-   * <p>
-   * e1 equals e2
-   * <b>iff</b>
-   * the coordinates of e1 are the same or the reverse of the coordinates in e2
-   */
-  public boolean equals(Object o)
-  {
-    if (! (o instanceof Edge)) return false;
-    Edge e = (Edge) o;
-
-    if (pts.length != e.pts.length) return false;
-
-    boolean isEqualForward = true;
-    boolean isEqualReverse = true;
-    int iRev = pts.length;
-    for (int i = 0; i < pts.length; i++) {
-      if (! pts[i].equals2D(e.pts[i])) {
-         isEqualForward = false;
-      }
-      if (! pts[i].equals2D(e.pts[--iRev])) {
-         isEqualReverse = false;
-      }
-      if (! isEqualForward && ! isEqualReverse) return false;
-    }
-    return true;
-  }
-
-  /**
-   * @return true if the coordinate sequences of the Edges are identical
-   */
-  public boolean isPointwiseEqual(Edge e)
-  {
-    if (pts.length != e.pts.length) return false;
-
-    for (int i = 0; i < pts.length; i++) {
-      if (! pts[i].equals2D(e.pts[i])) {
-         return false;
-      }
-    }
-    return true;
-  }
-
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeEnd.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeEnd.java	(revision 28245)
+++ 	(revision )
@@ -1,136 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import java.io.PrintStream;
-
-import com.vividsolutions.jts.algorithm.BoundaryNodeRule;
-import com.vividsolutions.jts.algorithm.CGAlgorithms;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.util.Assert;
-
-/**
- * Models the end of an edge incident on a node.
- * EdgeEnds have a direction
- * determined by the direction of the ray from the initial
- * point to the next point.
- * EdgeEnds are comparable under the ordering
- * "a has a greater angle with the x-axis than b".
- * This ordering is used to sort EdgeEnds around a node.
- * @version 1.7
- */
-public class EdgeEnd
-  implements Comparable<EdgeEnd>
-{
-  protected Edge edge;  // the parent edge of this edge end
-  protected Label label;
-
-  private Node node;          // the node this edge end originates at
-  private Coordinate p0, p1;  // points of initial line segment
-  private double dx, dy;      // the direction vector for this edge from its starting point
-  private int quadrant;
-
-  protected EdgeEnd(Edge edge)
-  {
-    this.edge = edge;
-  }
-  public EdgeEnd(Edge edge, Coordinate p0, Coordinate p1, Label label) {
-    this(edge);
-    init(p0, p1);
-    this.label = label;
-  }
-
-  protected void init(Coordinate p0, Coordinate p1)
-  {
-    this.p0 = p0;
-    this.p1 = p1;
-    dx = p1.x - p0.x;
-    dy = p1.y - p0.y;
-    quadrant = Quadrant.quadrant(dx, dy);
-    Assert.isTrue(! (dx == 0 && dy == 0), "EdgeEnd with identical endpoints found");
-  }
-
-  public Edge getEdge() { return edge; }
-  public Label getLabel() { return label; }
-  public Coordinate getCoordinate() { return p0; }
-  public Coordinate getDirectedCoordinate() { return p1; }
-
-  public void setNode(Node node) { this.node = node; }
-  public Node getNode() { return node; }
-
-  public int compareTo(EdgeEnd obj)
-  {
-      return compareDirection(obj);
-  }
-  /**
-   * Implements the total order relation:
-   * <p>
-   *    a has a greater angle with the positive x-axis than b
-   * <p>
-   * Using the obvious algorithm of simply computing the angle is not robust,
-   * since the angle calculation is obviously susceptible to roundoff.
-   * A robust algorithm is:
-   * - first compare the quadrant.  If the quadrants
-   * are different, it it trivial to determine which vector is "greater".
-   * - if the vectors lie in the same quadrant, the computeOrientation function
-   * can be used to decide the relative orientation of the vectors.
-   */
-  public int compareDirection(EdgeEnd e)
-  {
-    if (dx == e.dx && dy == e.dy)
-      return 0;
-    // if the rays are in different quadrants, determining the ordering is trivial
-    if (quadrant > e.quadrant) return 1;
-    if (quadrant < e.quadrant) return -1;
-    // vectors are in the same quadrant - check relative orientation of direction vectors
-    // this is > e if it is CCW of e
-    return CGAlgorithms.computeOrientation(e.p0, e.p1, p1);
-  }
-
-  @SuppressWarnings("unused")
-public void computeLabel(BoundaryNodeRule boundaryNodeRule)
-  {
-    // subclasses should override this if they are using labels
-  }
-  public void print(PrintStream out)
-  {
-    double angle = Math.atan2(dy, dx);
-    String className = getClass().getName();
-    int lastDotPos = className.lastIndexOf('.');
-    String name = className.substring(lastDotPos + 1);
-    out.print("  " + name + ": " + p0 + " - " + p1 + " " + quadrant + ":" + angle + "   " + label);
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeEndStar.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeEndStar.java	(revision 28245)
+++ 	(revision )
@@ -1,327 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import com.vividsolutions.jts.algorithm.BoundaryNodeRule;
-import com.vividsolutions.jts.algorithm.locate.SimplePointInAreaLocator;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Location;
-import com.vividsolutions.jts.geom.TopologyException;
-import com.vividsolutions.jts.util.Assert;
-
-/**
- * A EdgeEndStar is an ordered list of EdgeEnds around a node.
- * They are maintained in CCW order (starting with the positive x-axis) around the node
- * for efficient lookup and topology building.
- *
- * @version 1.7
- */
-abstract public class EdgeEndStar
-{
-
-  /**
-   * A map which maintains the edges in sorted order around the node
-   */
-  protected Map edgeMap = new TreeMap();
-  /**
-   * A list of all outgoing edges in the result, in CCW order
-   */
-  protected List edgeList;
-  /**
-   * The location of the point for this star in Geometry i Areas
-   */
-  private int[] ptInAreaLocation = { Location.NONE, Location.NONE };
-
-  public EdgeEndStar()
-  {
-
-  }
-
-  /**
-   * Insert a EdgeEnd into this EdgeEndStar
-   */
-  abstract public void insert(EdgeEnd e);
-
-  /**
-   * Insert an EdgeEnd into the map, and clear the edgeList cache,
-   * since the list of edges has now changed
-   */
-  protected void insertEdgeEnd(EdgeEnd e, Object obj)
-  {
-    edgeMap.put(e, obj);
-    edgeList = null;  // edge list has changed - clear the cache
-  }
-
-  /**
-   * @return the coordinate for the node this star is based at
-   */
-  public Coordinate getCoordinate()
-  {
-    Iterator it = iterator();
-    if (! it.hasNext()) return null;
-    EdgeEnd e = (EdgeEnd) it.next();
-    return e.getCoordinate();
-  }
-  public int getDegree()
-  {
-    return edgeMap.size();
-  }
-
-  /**
-   * Iterator access to the ordered list of edges is optimized by
-   * copying the map collection to a list.  (This assumes that
-   * once an iterator is requested, it is likely that insertion into
-   * the map is complete).
-   */
-  public Iterator iterator()
-  {
-    return getEdges().iterator();
-  }
-  public List getEdges()
-  {
-    if (edgeList == null) {
-      edgeList = new ArrayList(edgeMap.values());
-    }
-    return edgeList;
-  }
-
-  public void computeLabelling(GeometryGraph[] geomGraph)
-  {
-    computeEdgeEndLabels(geomGraph[0].getBoundaryNodeRule());
-    // Propagate side labels  around the edges in the star
-    // for each parent Geometry
-//Debug.print(this);
-    propagateSideLabels(0);
-//Debug.print(this);
-//Debug.printIfWatch(this);
-    propagateSideLabels(1);
-//Debug.print(this);
-//Debug.printIfWatch(this);
-
-    /**
-     * If there are edges that still have null labels for a geometry
-     * this must be because there are no area edges for that geometry incident on this node.
-     * In this case, to label the edge for that geometry we must test whether the
-     * edge is in the interior of the geometry.
-     * To do this it suffices to determine whether the node for the edge is in the interior of an area.
-     * If so, the edge has location INTERIOR for the geometry.
-     * In all other cases (e.g. the node is on a line, on a point, or not on the geometry at all) the edge
-     * has the location EXTERIOR for the geometry.
-     * <p>
-     * Note that the edge cannot be on the BOUNDARY of the geometry, since then
-     * there would have been a parallel edge from the Geometry at this node also labelled BOUNDARY
-     * and this edge would have been labelled in the previous step.
-     * <p>
-     * This code causes a problem when dimensional collapses are present, since it may try and
-     * determine the location of a node where a dimensional collapse has occurred.
-     * The point should be considered to be on the EXTERIOR
-     * of the polygon, but locate() will return INTERIOR, since it is passed
-     * the original Geometry, not the collapsed version.
-     *
-     * If there are incident edges which are Line edges labelled BOUNDARY,
-     * then they must be edges resulting from dimensional collapses.
-     * In this case the other edges can be labelled EXTERIOR for this Geometry.
-     *
-     * MD 8/11/01 - NOT TRUE!  The collapsed edges may in fact be in the interior of the Geometry,
-     * which means the other edges should be labelled INTERIOR for this Geometry.
-     * Not sure how solve this...  Possibly labelling needs to be split into several phases:
-     * area label propagation, symLabel merging, then finally null label resolution.
-     */
-    boolean[] hasDimensionalCollapseEdge = { false, false };
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      EdgeEnd e = (EdgeEnd) it.next();
-      Label label = e.getLabel();
-      for (int geomi = 0; geomi < 2; geomi++) {
-        if (label.isLine(geomi) && label.getLocation(geomi) == Location.BOUNDARY)
-          hasDimensionalCollapseEdge[geomi] = true;
-      }
-    }
-//Debug.print(this);
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      EdgeEnd e = (EdgeEnd) it.next();
-      Label label = e.getLabel();
-//Debug.println(e);
-      for (int geomi = 0; geomi < 2; geomi++) {
-        if (label.isAnyNull(geomi)) {
-          int loc = Location.NONE;
-          if (hasDimensionalCollapseEdge[geomi]) {
-            loc = Location.EXTERIOR;
-          }
-          else {
-            Coordinate p = e.getCoordinate();
-            loc = getLocation(geomi, p, geomGraph);
-          }
-          label.setAllLocationsIfNull(geomi, loc);
-        }
-      }
-//Debug.println(e);
-    }
-//Debug.print(this);
-//Debug.printIfWatch(this);
-  }
-
-  private void computeEdgeEndLabels(BoundaryNodeRule boundaryNodeRule)
-  {
-    // Compute edge label for each EdgeEnd
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      EdgeEnd ee = (EdgeEnd) it.next();
-      ee.computeLabel(boundaryNodeRule);
-    }
-  }
-  
-  private int getLocation(int geomIndex, Coordinate p, GeometryGraph[] geom)
-  {
-    // compute location only on demand
-    if (ptInAreaLocation[geomIndex] == Location.NONE) {
-      ptInAreaLocation[geomIndex] = SimplePointInAreaLocator.locate(p, geom[geomIndex].getGeometry());
-    }
-    return ptInAreaLocation[geomIndex];
-  }
-
-  public boolean isAreaLabelsConsistent(GeometryGraph geomGraph)
-  {
-    computeEdgeEndLabels(geomGraph.getBoundaryNodeRule());
-    return checkAreaLabelsConsistent(0);
-  }
-
-  private boolean checkAreaLabelsConsistent(int geomIndex)
-  {
-    // Since edges are stored in CCW order around the node,
-    // As we move around the ring we move from the right to the left side of the edge
-    List edges = getEdges();
-    // if no edges, trivially consistent
-    if (edges.size() <= 0)
-      return true;
-    // initialize startLoc to location of last L side (if any)
-    int lastEdgeIndex = edges.size() - 1;
-    Label startLabel = ((EdgeEnd) edges.get(lastEdgeIndex)).getLabel();
-    int startLoc = startLabel.getLocation(geomIndex, Position.LEFT);
-    Assert.isTrue(startLoc != Location.NONE, "Found unlabelled area edge");
-
-    int currLoc = startLoc;
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      EdgeEnd e = (EdgeEnd) it.next();
-      Label label = e.getLabel();
-      // we assume that we are only checking a area
-      Assert.isTrue(label.isArea(geomIndex), "Found non-area edge");
-      int leftLoc   = label.getLocation(geomIndex, Position.LEFT);
-      int rightLoc  = label.getLocation(geomIndex, Position.RIGHT);
-//System.out.println(leftLoc + " " + rightLoc);
-//Debug.print(this);
-      // check that edge is really a boundary between inside and outside!
-      if (leftLoc == rightLoc) {
-        return false;
-      }
-      // check side location conflict
-      //Assert.isTrue(rightLoc == currLoc, "side location conflict " + locStr);
-      if (rightLoc != currLoc) {
-//Debug.print(this);
-        return false;
-      }
-      currLoc = leftLoc;
-    }
-    return true;
-  }
-  void propagateSideLabels(int geomIndex)
-  {
-    // Since edges are stored in CCW order around the node,
-    // As we move around the ring we move from the right to the left side of the edge
-    int startLoc = Location.NONE ;
-    
-    // initialize loc to location of last L side (if any)
-//System.out.println("finding start location");
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      EdgeEnd e = (EdgeEnd) it.next();
-      Label label = e.getLabel();
-      if (label.isArea(geomIndex) && label.getLocation(geomIndex, Position.LEFT) != Location.NONE)
-        startLoc = label.getLocation(geomIndex, Position.LEFT);
-    }
-    
-    // no labelled sides found, so no labels to propagate
-    if (startLoc == Location.NONE) return;
-
-    int currLoc = startLoc;
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      EdgeEnd e = (EdgeEnd) it.next();
-      Label label = e.getLabel();
-      // set null ON values to be in current location
-      if (label.getLocation(geomIndex, Position.ON) == Location.NONE)
-          label.setLocation(geomIndex, Position.ON, currLoc);
-      // set side labels (if any)
-      if (label.isArea(geomIndex)) {
-        int leftLoc   = label.getLocation(geomIndex, Position.LEFT);
-        int rightLoc  = label.getLocation(geomIndex, Position.RIGHT);
-        // if there is a right location, that is the next location to propagate
-        if (rightLoc != Location.NONE) {
-//Debug.print(rightLoc != currLoc, this);
-          if (rightLoc != currLoc)
-            throw new TopologyException("side location conflict", e.getCoordinate());
-          if (leftLoc == Location.NONE) {
-            Assert.shouldNeverReachHere("found single null side (at " + e.getCoordinate() + ")");
-          }
-          currLoc = leftLoc;
-        }
-        else {
-          /** RHS is null - LHS must be null too.
-           *  This must be an edge from the other geometry, which has no location
-           *  labelling for this geometry.  This edge must lie wholly inside or outside
-           *  the other geometry (which is determined by the current location).
-           *  Assign both sides to be the current location.
-           */
-          Assert.isTrue(label.getLocation(geomIndex, Position.LEFT) == Location.NONE, "found single null side");
-          label.setLocation(geomIndex, Position.RIGHT, currLoc);
-          label.setLocation(geomIndex, Position.LEFT, currLoc);
-        }
-      }
-    }
-  }
-
-  public void print(PrintStream out)
-  {
-    System.out.println("EdgeEndStar:   " + getCoordinate());
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      EdgeEnd e = (EdgeEnd) it.next();
-      e.print(out);
-    }
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeIntersection.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeIntersection.java	(revision 28245)
+++ 	(revision )
@@ -1,89 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import com.vividsolutions.jts.geom.Coordinate;
-
-/**
- * Represents a point on an
- * edge which intersects with another edge.
- * <p>
- * The intersection may either be a single point, or a line segment
- * (in which case this point is the start of the line segment)
- * The intersection point must be precise.
- *
- * @version 1.7
- */
-public class EdgeIntersection
-    implements Comparable
-{
-
-  public Coordinate coord;   // the point of intersection
-  public int segmentIndex;   // the index of the containing line segment in the parent edge
-  public double dist;        // the edge distance of this point along the containing line segment
-
-  public EdgeIntersection(Coordinate coord, int segmentIndex, double dist) {
-    this.coord = new Coordinate(coord);
-    this.segmentIndex = segmentIndex;
-    this.dist = dist;
-  }
-
-  public int compareTo(Object obj)
-  {
-    EdgeIntersection other = (EdgeIntersection) obj;
-    return compare(other.segmentIndex, other.dist);
-  }
-  /**
-   * @return -1 this EdgeIntersection is located before the argument location
-   * @return 0 this EdgeIntersection is at the argument location
-   * @return 1 this EdgeIntersection is located after the argument location
-   */
-  public int compare(int segmentIndex, double dist)
-  {
-    if (this.segmentIndex < segmentIndex) return -1;
-    if (this.segmentIndex > segmentIndex) return 1;
-    if (this.dist < dist) return -1;
-    if (this.dist > dist) return 1;
-    return 0;
-  }
-
-  public boolean isEndPoint(int maxSegmentIndex)
-  {
-    if (segmentIndex == 0 && dist == 0.0) return true;
-    if (segmentIndex == maxSegmentIndex) return true;
-    return false;
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeIntersectionList.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeIntersectionList.java	(revision 28245)
+++ 	(revision )
@@ -1,163 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import com.vividsolutions.jts.geom.Coordinate;
-
-/**
- * A list of edge intersections along an {@link Edge}.
- * Implements splitting an edge with intersections
- * into multiple resultant edges.
- *
- * @version 1.7
- */
-public class EdgeIntersectionList
-{
-  // a Map <EdgeIntersection, EdgeIntersection>
-  private Map nodeMap = new TreeMap();
-  Edge edge;  // the parent edge
-
-  public EdgeIntersectionList(Edge edge)
-  {
-    this.edge = edge;
-  }
-
-  /**
-   * Adds an intersection into the list, if it isn't already there.
-   * The input segmentIndex and dist are expected to be normalized.
-   * @return the EdgeIntersection found or added
-   */
-  public EdgeIntersection add(Coordinate intPt, int segmentIndex, double dist)
-  {
-    EdgeIntersection eiNew = new EdgeIntersection(intPt, segmentIndex, dist);
-    EdgeIntersection ei = (EdgeIntersection) nodeMap.get(eiNew);
-    if (ei != null) {
-      return ei;
-    }
-    nodeMap.put(eiNew, eiNew);
-    return eiNew;
-  }
-
-  /**
-   * Returns an iterator of {@link EdgeIntersection}s
-   *
-   * @return an Iterator of EdgeIntersections
-   */
-  public Iterator iterator() { return nodeMap.values().iterator(); }
-
-  /**
-   * Tests if the given point is an edge intersection
-   *
-   * @param pt the point to test
-   * @return true if the point is an intersection
-   */
-  public boolean isIntersection(Coordinate pt)
-  {
-    for (Iterator it = iterator(); it.hasNext(); ) {
-      EdgeIntersection ei = (EdgeIntersection) it.next();
-      if (ei.coord.equals(pt))
-       return true;
-    }
-    return false;
-  }
-
-  /**
-   * Adds entries for the first and last points of the edge to the list
-   */
-  public void addEndpoints()
-  {
-    int maxSegIndex = edge.pts.length - 1;
-    add(edge.pts[0], 0, 0.0);
-    add(edge.pts[maxSegIndex], maxSegIndex, 0.0);
-  }
-
-  /**
-   * Creates new edges for all the edges that the intersections in this
-   * list split the parent edge into.
-   * Adds the edges to the input list (this is so a single list
-   * can be used to accumulate all split edges for a Geometry).
-   *
-   * @param edgeList a list of EdgeIntersections
-   */
-  public void addSplitEdges(List edgeList)
-  {
-    // ensure that the list has entries for the first and last point of the edge
-    addEndpoints();
-
-    Iterator it = iterator();
-    // there should always be at least two entries in the list
-    EdgeIntersection eiPrev = (EdgeIntersection) it.next();
-    while (it.hasNext()) {
-      EdgeIntersection ei = (EdgeIntersection) it.next();
-      Edge newEdge = createSplitEdge(eiPrev, ei);
-      edgeList.add(newEdge);
-
-      eiPrev = ei;
-    }
-  }
-  /**
-   * Create a new "split edge" with the section of points between
-   * (and including) the two intersections.
-   * The label for the new edge is the same as the label for the parent edge.
-   */
-  Edge createSplitEdge(EdgeIntersection ei0, EdgeIntersection ei1)
-  {
-//Debug.print("\ncreateSplitEdge"); Debug.print(ei0); Debug.print(ei1);
-    int npts = ei1.segmentIndex - ei0.segmentIndex + 2;
-
-    Coordinate lastSegStartPt = edge.pts[ei1.segmentIndex];
-    // if the last intersection point is not equal to the its segment start pt,
-    // add it to the points list as well.
-    // (This check is needed because the distance metric is not totally reliable!)
-    // The check for point equality is 2D only - Z values are ignored
-    boolean useIntPt1 = ei1.dist > 0.0 || ! ei1.coord.equals2D(lastSegStartPt);
-    if (! useIntPt1) {
-      npts--;
-    }
-
-    Coordinate[] pts = new Coordinate[npts];
-    int ipt = 0;
-    pts[ipt++] = new Coordinate(ei0.coord);
-    for (int i = ei0.segmentIndex + 1; i <= ei1.segmentIndex; i++) {
-      pts[ipt++] = edge.pts[i];
-    }
-    if (useIntPt1) pts[ipt] = ei1.coord;
-    return new Edge(pts, new Label(edge.label));
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeList.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeList.java	(revision 28245)
+++ 	(revision )
@@ -1,100 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import com.vividsolutions.jts.noding.OrientedCoordinateArray;
-
-/**
- * A EdgeList is a list of Edges.  It supports locating edges
- * that are pointwise equals to a target edge.
- * @version 1.7
- */
-public class EdgeList
-{
-  private List edges = new ArrayList();
-  /**
-   * An index of the edges, for fast lookup.
-   *
-   */
-  private Map ocaMap = new TreeMap();
-
-  public EdgeList() {
-  }
-
-  /**
-   * Insert an edge unless it is already in the list
-   */
-  public void add(Edge e)
-  {
-    edges.add(e);
-    OrientedCoordinateArray oca = new OrientedCoordinateArray(e.getCoordinates());
-    ocaMap.put(oca, e);
-  }
-
-  public void addAll(Collection edgeColl)
-  {
-    for (Iterator i = edgeColl.iterator(); i.hasNext(); ) {
-      add((Edge) i.next());
-    }
-  }
-
-  public List getEdges() { return edges; }
-
-  /**
-   * If there is an edge equal to e already in the list, return it.
-   * Otherwise return null.
-   * @return  equal edge, if there is one already in the list
-   *          null otherwise
-   */
-  public Edge findEqualEdge(Edge e)
-  {
-    OrientedCoordinateArray oca = new OrientedCoordinateArray(e.getCoordinates());
-    // will return null if no edge matches
-    Edge matchEdge = (Edge) ocaMap.get(oca);
-    return matchEdge; 
-  }
-  
-  public Iterator iterator() { return edges.iterator(); }
-
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeNodingValidator.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeNodingValidator.java	(revision 28245)
+++ 	(revision )
@@ -1,102 +1,0 @@
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-import com.vividsolutions.jts.geom.TopologyException;
-import com.vividsolutions.jts.noding.BasicSegmentString;
-import com.vividsolutions.jts.noding.FastNodingValidator;
-
-/**
- * Validates that a collection of {@link Edge}s is correctly noded.
- * Throws an appropriate exception if an noding error is found.
- *
- * @version 1.7
- */
-public class EdgeNodingValidator 
-{  
-	/**
-   * Checks whether the supplied {@link Edge}s
-   * are correctly noded.  
-   * Throws a  {@link TopologyException} if they are not.
-   * 
-   * @param edges a collection of Edges.
-   * @throws TopologyException if the SegmentStrings are not correctly noded
-   *
-   */
-	public static void checkValid(Collection edges)
-	{
-		EdgeNodingValidator validator = new EdgeNodingValidator(edges);
-		validator.checkValid();
-	}
-	
-  public static Collection toSegmentStrings(Collection edges)
-  {
-    // convert Edges to SegmentStrings
-    Collection segStrings = new ArrayList();
-    for (Iterator i = edges.iterator(); i.hasNext(); ) {
-      Edge e = (Edge) i.next();
-      segStrings.add(new BasicSegmentString(e.getCoordinates(), e));
-    }
-    return segStrings;
-  }
-
-  private FastNodingValidator nv;
-
-  /**
-   * Creates a new validator for the given collection of {@link Edge}s.
-   * 
-   * @param edges a collection of Edges.
-   */
-  public EdgeNodingValidator(Collection edges)
-  {
-    nv = new FastNodingValidator(toSegmentStrings(edges));
-  }
-
-  /**
-   * Checks whether the supplied edges
-   * are correctly noded.  Throws an exception if they are not.
-   * 
-   * @throws TopologyException if the SegmentStrings are not correctly noded
-   *
-   */
-  public void checkValid()
-  {
-    nv.checkValid();
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeRing.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/EdgeRing.java	(revision 28245)
+++ 	(revision )
@@ -1,224 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.vividsolutions.jts.algorithm.CGAlgorithms;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geom.LinearRing;
-import com.vividsolutions.jts.geom.Location;
-import com.vividsolutions.jts.geom.Polygon;
-import com.vividsolutions.jts.geom.TopologyException;
-import com.vividsolutions.jts.util.Assert;
-
-
-/**
- * @version 1.7
- */
-public abstract class EdgeRing {
-
-  protected DirectedEdge startDe; // the directed edge which starts the list of edges for this EdgeRing
-  private int maxNodeDegree = -1;
-  private List edges = new ArrayList(); // the DirectedEdges making up this EdgeRing
-  private List pts = new ArrayList();
-  private Label label = new Label(Location.NONE); // label stores the locations of each geometry on the face surrounded by this ring
-  private LinearRing ring;  // the ring created for this EdgeRing
-  private boolean isHole;
-  private EdgeRing shell;   // if non-null, the ring is a hole and this EdgeRing is its containing shell
-  private ArrayList holes = new ArrayList(); // a list of EdgeRings which are holes in this EdgeRing
-
-  protected GeometryFactory geometryFactory;
-
-  public EdgeRing(DirectedEdge start, GeometryFactory geometryFactory) {
-    this.geometryFactory = geometryFactory;
-    computePoints(start);
-    computeRing();
-  }
-
-  public boolean isHole()
-  {
-    //computePoints();
-    return isHole;
-  }
-
-  public Coordinate getCoordinate(int i) { return (Coordinate) pts.get(i);  }
-  public LinearRing getLinearRing() { return ring; }
-  public EdgeRing getShell() { return shell; }
-  public void setShell(EdgeRing shell)
-  {
-    this.shell = shell;
-    if (shell != null) shell.addHole(this);
-  }
-  public void addHole(EdgeRing ring) { holes.add(ring); }
-
-  public Polygon toPolygon(GeometryFactory geometryFactory)
-  {
-    LinearRing[] holeLR = new LinearRing[holes.size()];
-    for (int i = 0; i < holes.size(); i++) {
-      holeLR[i] = ((EdgeRing) holes.get(i)).getLinearRing();
-    }
-    Polygon poly = geometryFactory.createPolygon(getLinearRing(), holeLR);
-    return poly;
-  }
-  /**
-   * Compute a LinearRing from the point list previously collected.
-   * Test if the ring is a hole (i.e. if it is CCW) and set the hole flag
-   * accordingly.
-   */
-  public void computeRing()
-  {
-    if (ring != null) return;   // don't compute more than once
-    Coordinate[] coord = new Coordinate[pts.size()];
-    for (int i = 0; i < pts.size(); i++) {
-      coord[i] = (Coordinate) pts.get(i);
-    }
-    ring = geometryFactory.createLinearRing(coord);
-    isHole = CGAlgorithms.isCCW(ring.getCoordinates());
-//Debug.println( (isHole ? "hole - " : "shell - ") + WKTWriter.toLineString(new CoordinateArraySequence(ring.getCoordinates())));
-  }
-  abstract public DirectedEdge getNext(DirectedEdge de);
-  abstract public void setEdgeRing(DirectedEdge de, EdgeRing er);
-
-  /**
-   * Returns the list of DirectedEdges that make up this EdgeRing
-   */
-  public List getEdges() { return edges; }
-
-  /**
-   * Collect all the points from the DirectedEdges of this ring into a contiguous list
-   */
-  protected void computePoints(DirectedEdge start)
-  {
-//System.out.println("buildRing");
-    startDe = start;
-    DirectedEdge de = start;
-    boolean isFirstEdge = true;
-    do {
-//      Assert.isTrue(de != null, "found null Directed Edge");
-      if (de == null)
-        throw new TopologyException("Found null DirectedEdge");
-      if (de.getEdgeRing() == this)
-        throw new TopologyException("Directed Edge visited twice during ring-building at " + de.getCoordinate());
-
-      edges.add(de);
-//Debug.println(de);
-//Debug.println(de.getEdge());
-      Label label = de.getLabel();
-      Assert.isTrue(label.isArea());
-      mergeLabel(label);
-      addPoints(de.getEdge(), de.isForward(), isFirstEdge);
-      isFirstEdge = false;
-      setEdgeRing(de, this);
-      de = getNext(de);
-    } while (de != startDe);
-  }
-
-  public int getMaxNodeDegree()
-  {
-    if (maxNodeDegree < 0) computeMaxNodeDegree();
-    return maxNodeDegree;
-  }
-
-  private void computeMaxNodeDegree()
-  {
-    maxNodeDegree = 0;
-    DirectedEdge de = startDe;
-    do {
-      Node node = de.getNode();
-      int degree = ((DirectedEdgeStar) node.getEdges()).getOutgoingDegree(this);
-      if (degree > maxNodeDegree) maxNodeDegree = degree;
-      de = getNext(de);
-    } while (de != startDe);
-    maxNodeDegree *= 2;
-  }
-
-
-  public void setInResult()
-  {
-    DirectedEdge de = startDe;
-    do {
-      de.getEdge().setInResult(true);
-      de = de.getNext();
-    } while (de != startDe);
-  }
-
-  protected void mergeLabel(Label deLabel)
-  {
-    mergeLabel(deLabel, 0);
-    mergeLabel(deLabel, 1);
-  }
-  /**
-   * Merge the RHS label from a DirectedEdge into the label for this EdgeRing.
-   * The DirectedEdge label may be null.  This is acceptable - it results
-   * from a node which is NOT an intersection node between the Geometries
-   * (e.g. the end node of a LinearRing).  In this case the DirectedEdge label
-   * does not contribute any information to the overall labelling, and is simply skipped.
-   */
-  protected void mergeLabel(Label deLabel, int geomIndex)
-  {
-    int loc = deLabel.getLocation(geomIndex, Position.RIGHT);
-    // no information to be had from this label
-    if (loc == Location.NONE) return;
-    // if there is no current RHS value, set it
-    if (label.getLocation(geomIndex) == Location.NONE) {
-      label.setLocation(geomIndex, loc);
-      return;
-    }
-  }
-  protected void addPoints(Edge edge, boolean isForward, boolean isFirstEdge)
-  {
-    Coordinate[] edgePts = edge.getCoordinates();
-    if (isForward) {
-      int startIndex = 1;
-      if (isFirstEdge) startIndex = 0;
-      for (int i = startIndex; i < edgePts.length; i++) {
-        pts.add(edgePts[i]);
-      }
-    }
-    else { // is backward
-      int startIndex = edgePts.length - 2;
-      if (isFirstEdge) startIndex = edgePts.length - 1;
-      for (int i = startIndex; i >= 0; i--) {
-        pts.add(edgePts[i]);
-      }
-    }
-  }
-
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/GeometryGraph.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/GeometryGraph.java	(revision 28245)
+++ 	(revision )
@@ -1,424 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import com.vividsolutions.jts.algorithm.BoundaryNodeRule;
-import com.vividsolutions.jts.algorithm.CGAlgorithms;
-import com.vividsolutions.jts.algorithm.LineIntersector;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.CoordinateArrays;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.GeometryCollection;
-import com.vividsolutions.jts.geom.LineString;
-import com.vividsolutions.jts.geom.LinearRing;
-import com.vividsolutions.jts.geom.Location;
-import com.vividsolutions.jts.geom.MultiLineString;
-import com.vividsolutions.jts.geom.MultiPoint;
-import com.vividsolutions.jts.geom.MultiPolygon;
-import com.vividsolutions.jts.geom.Point;
-import com.vividsolutions.jts.geom.Polygon;
-import com.vividsolutions.jts.geomgraph.index.EdgeSetIntersector;
-import com.vividsolutions.jts.geomgraph.index.SegmentIntersector;
-import com.vividsolutions.jts.geomgraph.index.SimpleMCSweepLineIntersector;
-import com.vividsolutions.jts.util.Assert;
-
-/**
- * A GeometryGraph is a graph that models a given Geometry
- * @version 1.7
- */
-public class GeometryGraph
-  extends PlanarGraph
-{
-/**
- * This method implements the Boundary Determination Rule
- * for determining whether
- * a component (node or edge) that appears multiple times in elements
- * of a MultiGeometry is in the boundary or the interior of the Geometry
- * <br>
- * The SFS uses the "Mod-2 Rule", which this function implements
- * <br>
- * An alternative (and possibly more intuitive) rule would be
- * the "At Most One Rule":
- *    isInBoundary = (componentCount == 1)
- */
-/*
-  public static boolean isInBoundary(int boundaryCount)
-  {
-    // the "Mod-2 Rule"
-    return boundaryCount % 2 == 1;
-  }
-  public static int determineBoundary(int boundaryCount)
-  {
-    return isInBoundary(boundaryCount) ? Location.BOUNDARY : Location.INTERIOR;
-  }
-*/
-
-  public static int determineBoundary(BoundaryNodeRule boundaryNodeRule, int boundaryCount)
-  {
-    return boundaryNodeRule.isInBoundary(boundaryCount)
-        ? Location.BOUNDARY : Location.INTERIOR;
-  }
-
-  private Geometry parentGeom;
-
-  /**
-   * The lineEdgeMap is a map of the linestring components of the
-   * parentGeometry to the edges which are derived from them.
-   * This is used to efficiently perform findEdge queries
-   */
-  private Map lineEdgeMap = new HashMap();
-
-  private BoundaryNodeRule boundaryNodeRule = null;
-
-  /**
-   * If this flag is true, the Boundary Determination Rule will used when deciding
-   * whether nodes are in the boundary or not
-   */
-  private boolean useBoundaryDeterminationRule = true;
-  private int argIndex;  // the index of this geometry as an argument to a spatial function (used for labelling)
-  private Collection boundaryNodes;
-  private boolean hasTooFewPoints = false;
-  private Coordinate invalidPoint = null;
-
-  // for use if geometry is not Polygonal
-  
-  private EdgeSetIntersector createEdgeSetIntersector()
-  {
-  // various options for computing intersections, from slowest to fastest
-
-  //private EdgeSetIntersector esi = new SimpleEdgeSetIntersector();
-  //private EdgeSetIntersector esi = new MonotoneChainIntersector();
-  //private EdgeSetIntersector esi = new NonReversingChainIntersector();
-  //private EdgeSetIntersector esi = new SimpleSweepLineIntersector();
-  //private EdgeSetIntersector esi = new MCSweepLineIntersector();
-
-    //return new SimpleEdgeSetIntersector();
-    return new SimpleMCSweepLineIntersector();
-  }
-
-  public GeometryGraph(int argIndex, Geometry parentGeom)
-  {
-    this(argIndex, parentGeom,
-         BoundaryNodeRule.OGC_SFS_BOUNDARY_RULE
-         );
-  }
-
-  public GeometryGraph(int argIndex, Geometry parentGeom, BoundaryNodeRule boundaryNodeRule) {
-    this.argIndex = argIndex;
-    this.parentGeom = parentGeom;
-    this.boundaryNodeRule = boundaryNodeRule;
-    if (parentGeom != null) {
-//      precisionModel = parentGeom.getPrecisionModel();
-//      SRID = parentGeom.getSRID();
-      add(parentGeom);
-    }
-  }
-
-  /**
-   * This constructor is used by clients that wish to add Edges explicitly,
-   * rather than adding a Geometry.  (An example is BufferOp).
-   */
-  // no longer used
-//  public GeometryGraph(int argIndex, PrecisionModel precisionModel, int SRID) {
-//    this(argIndex, null);
-//    this.precisionModel = precisionModel;
-//    this.SRID = SRID;
-//  }
-//  public PrecisionModel getPrecisionModel()
-//  {
-//    return precisionModel;
-//  }
-//  public int getSRID() { return SRID; }
-
-  public boolean hasTooFewPoints() { return hasTooFewPoints; }
-
-  public Coordinate getInvalidPoint() { return invalidPoint; }
-
-  public Geometry getGeometry() { return parentGeom; }
-
-  public BoundaryNodeRule getBoundaryNodeRule() { return boundaryNodeRule; }
-
-  public Collection getBoundaryNodes()
-  {
-    if (boundaryNodes == null)
-      boundaryNodes = nodes.getBoundaryNodes(argIndex);
-    return boundaryNodes;
-  }
-
-
-  public Edge findEdge(LineString line)
-  {
-    return (Edge) lineEdgeMap.get(line);
-  }
-
-  public void computeSplitEdges(List edgelist)
-  {
-    for (Iterator i = edges.iterator(); i.hasNext(); ) {
-      Edge e = (Edge) i.next();
-      e.eiList.addSplitEdges(edgelist);
-    }
-  }
-  private void add(Geometry g)
-  {
-    if (g.isEmpty()) return;
-
-    // check if this Geometry should obey the Boundary Determination Rule
-    // all collections except MultiPolygons obey the rule
-    if (g instanceof MultiPolygon)
-      useBoundaryDeterminationRule = false;
-
-    if (g instanceof Polygon)                 addPolygon((Polygon) g);
-                        // LineString also handles LinearRings
-    else if (g instanceof LineString)         addLineString((LineString) g);
-    else if (g instanceof Point)              addPoint((Point) g);
-    else if (g instanceof MultiPoint)         addCollection((MultiPoint) g);
-    else if (g instanceof MultiLineString)    addCollection((MultiLineString) g);
-    else if (g instanceof MultiPolygon)       addCollection((MultiPolygon) g);
-    else if (g instanceof GeometryCollection) addCollection((GeometryCollection) g);
-    else  throw new UnsupportedOperationException(g.getClass().getName());
-  }
-
-  private void addCollection(GeometryCollection gc)
-  {
-    for (int i = 0; i < gc.getNumGeometries(); i++) {
-      Geometry g = gc.getGeometryN(i);
-      add(g);
-    }
-  }
-  /**
-   * Add a Point to the graph.
-   */
-  private void addPoint(Point p)
-  {
-    Coordinate coord = p.getCoordinate();
-    insertPoint(argIndex, coord, Location.INTERIOR);
-  }
-  
-  /**
-   * Adds a polygon ring to the graph.
-   * Empty rings are ignored.
-   * 
-   * The left and right topological location arguments assume that the ring is oriented CW.
-   * If the ring is in the opposite orientation,
-   * the left and right locations must be interchanged.
-   */
-  private void addPolygonRing(LinearRing lr, int cwLeft, int cwRight)
-  {
-  	// don't bother adding empty holes
-  	if (lr.isEmpty()) return;
-  	
-    Coordinate[] coord = CoordinateArrays.removeRepeatedPoints(lr.getCoordinates());
-
-    if (coord.length < 4) {
-      hasTooFewPoints = true;
-      invalidPoint = coord[0];
-      return;
-    }
-
-    int left  = cwLeft;
-    int right = cwRight;
-    if (CGAlgorithms.isCCW(coord)) {
-      left = cwRight;
-      right = cwLeft;
-    }
-    Edge e = new Edge(coord,
-                        new Label(argIndex, Location.BOUNDARY, left, right));
-    lineEdgeMap.put(lr, e);
-
-    insertEdge(e);
-    // insert the endpoint as a node, to mark that it is on the boundary
-    insertPoint(argIndex, coord[0], Location.BOUNDARY);
-  }
-
-  private void addPolygon(Polygon p)
-  {
-    addPolygonRing(
-            (LinearRing) p.getExteriorRing(),
-            Location.EXTERIOR,
-            Location.INTERIOR);
-
-    for (int i = 0; i < p.getNumInteriorRing(); i++) {
-    	LinearRing hole = (LinearRing) p.getInteriorRingN(i);
-    	
-      // Holes are topologically labelled opposite to the shell, since
-      // the interior of the polygon lies on their opposite side
-      // (on the left, if the hole is oriented CW)
-      addPolygonRing(
-      		hole,
-          Location.INTERIOR,
-          Location.EXTERIOR);
-    }
-  }
-
-  private void addLineString(LineString line)
-  {
-    Coordinate[] coord = CoordinateArrays.removeRepeatedPoints(line.getCoordinates());
-
-    if (coord.length < 2) {
-      hasTooFewPoints = true;
-      invalidPoint = coord[0];
-      return;
-    }
-
-    // add the edge for the LineString
-    // line edges do not have locations for their left and right sides
-    Edge e = new Edge(coord, new Label(argIndex, Location.INTERIOR));
-    lineEdgeMap.put(line, e);
-    insertEdge(e);
-    /**
-     * Add the boundary points of the LineString, if any.
-     * Even if the LineString is closed, add both points as if they were endpoints.
-     * This allows for the case that the node already exists and is a boundary point.
-     */
-    Assert.isTrue(coord.length >= 2, "found LineString with single point");
-    insertBoundaryPoint(argIndex, coord[0]);
-    insertBoundaryPoint(argIndex, coord[coord.length - 1]);
-
-  }
-
-
-  /**
-   * Compute self-nodes, taking advantage of the Geometry type to
-   * minimize the number of intersection tests.  (E.g. rings are
-   * not tested for self-intersection, since they are assumed to be valid).
-   * @param li the LineIntersector to use
-   * @param computeRingSelfNodes if <false>, intersection checks are optimized to not test rings for self-intersection
-   * @return the SegmentIntersector used, containing information about the intersections found
-   */
-  public SegmentIntersector computeSelfNodes(LineIntersector li, boolean computeRingSelfNodes)
-  {
-    SegmentIntersector si = new SegmentIntersector(li, true, false);
-    EdgeSetIntersector esi = createEdgeSetIntersector();
-    // optimized test for Polygons and Rings
-    if (! computeRingSelfNodes
-        && (parentGeom instanceof LinearRing
-        || parentGeom instanceof Polygon
-        || parentGeom instanceof MultiPolygon)) {
-      esi.computeIntersections(edges, si, false);
-    }
-    else {
-      esi.computeIntersections(edges, si, true);
-    }
-//System.out.println("SegmentIntersector # tests = " + si.numTests);
-    addSelfIntersectionNodes(argIndex);
-    return si;
-  }
-
-  public SegmentIntersector computeEdgeIntersections(
-    GeometryGraph g,
-    LineIntersector li,
-    boolean includeProper)
-  {
-    SegmentIntersector si = new SegmentIntersector(li, includeProper, true);
-    si.setBoundaryNodes(this.getBoundaryNodes(), g.getBoundaryNodes());
-
-    EdgeSetIntersector esi = createEdgeSetIntersector();
-    esi.computeIntersections(edges, g.edges, si);
-/*
-for (Iterator i = g.edges.iterator(); i.hasNext();) {
-Edge e = (Edge) i.next();
-Debug.print(e.getEdgeIntersectionList());
-}
-*/
-    return si;
-  }
-
-  private void insertPoint(int argIndex, Coordinate coord, int onLocation)
-  {
-    Node n = nodes.addNode(coord);
-    Label lbl = n.getLabel();
-    if (lbl == null) {
-      n.label = new Label(argIndex, onLocation);
-    }
-    else
-      lbl.setLocation(argIndex, onLocation);
-  }
-
-  /**
-   * Adds candidate boundary points using the current {@link BoundaryNodeRule}.
-   * This is used to add the boundary
-   * points of dim-1 geometries (Curves/MultiCurves).
-   */
-  private void insertBoundaryPoint(int argIndex, Coordinate coord)
-  {
-    Node n = nodes.addNode(coord);
-    Label lbl = n.getLabel();
-    // the new point to insert is on a boundary
-    int boundaryCount = 1;
-    // determine the current location for the point (if any)
-    int loc = Location.NONE;
-    if (lbl != null) loc = lbl.getLocation(argIndex, Position.ON);
-    if (loc == Location.BOUNDARY) boundaryCount++;
-
-    // determine the boundary status of the point according to the Boundary Determination Rule
-    int newLoc = determineBoundary(boundaryNodeRule, boundaryCount);
-    lbl.setLocation(argIndex, newLoc);
-  }
-
-  private void addSelfIntersectionNodes(int argIndex)
-  {
-    for (Iterator i = edges.iterator(); i.hasNext(); ) {
-      Edge e = (Edge) i.next();
-      int eLoc = e.getLabel().getLocation(argIndex);
-      for (Iterator eiIt = e.eiList.iterator(); eiIt.hasNext(); ) {
-        EdgeIntersection ei = (EdgeIntersection) eiIt.next();
-        addSelfIntersectionNode(argIndex, ei.coord, eLoc);
-      }
-    }
-  }
-  /**
-   * Add a node for a self-intersection.
-   * If the node is a potential boundary node (e.g. came from an edge which
-   * is a boundary) then insert it as a potential boundary node.
-   * Otherwise, just add it as a regular node.
-   */
-  private void addSelfIntersectionNode(int argIndex, Coordinate coord, int loc)
-  {
-    // if this node is already a boundary node, don't change it
-    if (isBoundaryNode(argIndex, coord)) return;
-    if (loc == Location.BOUNDARY && useBoundaryDeterminationRule)
-        insertBoundaryPoint(argIndex, coord);
-    else
-      insertPoint(argIndex, coord, loc);
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/GraphComponent.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/GraphComponent.java	(revision 28245)
+++ 	(revision )
@@ -1,97 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.IntersectionMatrix;
-import com.vividsolutions.jts.util.Assert;
-
-/**
- * A GraphComponent is the parent class for the objects'
- * that form a graph.  Each GraphComponent can carry a
- * Label.
- * @version 1.7
- */
-abstract public class GraphComponent {
-
-  protected Label label;
-  /**
-   * isInResult indicates if this component has already been included in the result
-   */
-  private boolean isInResult = false;
-  private boolean isCovered = false;
-  private boolean isCoveredSet = false;
-
-  public GraphComponent() {
-  }
-
-  public Label getLabel() { return label; }
-  public void setInResult(boolean isInResult) { this.isInResult = isInResult; }
-  public boolean isInResult() { return isInResult; }
-  public void setCovered(boolean isCovered)
-  {
-    this.isCovered = isCovered;
-    this.isCoveredSet = true;
-  }
-  public boolean isCovered()    { return isCovered; }
-  public boolean isCoveredSet() { return isCoveredSet; }
-  /**
-   * @return a coordinate in this component (or null, if there are none)
-   */
-  abstract public Coordinate getCoordinate();
-  /**
-   * compute the contribution to an IM for this component
-   */
-  abstract protected void computeIM(IntersectionMatrix im);
-  /**
-   * An isolated component is one that does not intersect or touch any other
-   * component.  This is the case if the label has valid locations for
-   * only a single Geometry.
-   *
-   * @return true if this component is isolated
-   */
-  abstract public boolean isIsolated();
-  /**
-   * Update the IM with the contribution for this component.
-   * A component only contributes if it has a labelling for both parent geometries
-   */
-  public void updateIM(IntersectionMatrix im)
-  {
-    Assert.isTrue(label.getGeometryCount() >= 2, "found partial label");
-    computeIM(im);
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/Label.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/Label.java	(revision 28245)
+++ 	(revision )
@@ -1,211 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import com.vividsolutions.jts.geom.Location;
-
- /**
- * A <code>Label</code> indicates the topological relationship of a component
- * of a topology graph to a given <code>Geometry</code>.
- * This class supports labels for relationships to two <code>Geometry</code>s,
- * which is sufficient for algorithms for binary operations.
- * <P>
- * Topology graphs support the concept of labeling nodes and edges in the graph.
- * The label of a node or edge specifies its topological relationship to one or
- * more geometries.  (In fact, since JTS operations have only two arguments labels
- * are required for only two geometries).  A label for a node or edge has one or
- * two elements, depending on whether the node or edge occurs in one or both of the
- * input <code>Geometry</code>s.  Elements contain attributes which categorize the
- * topological location of the node or edge relative to the parent
- * <code>Geometry</code>; that is, whether the node or edge is in the interior,
- * boundary or exterior of the <code>Geometry</code>.  Attributes have a value
- * from the set <code>{Interior, Boundary, Exterior}</code>.  In a node each
- * element has  a single attribute <code>&lt;On&gt;</code>.  For an edge each element has a
- * triplet of attributes <code>&lt;Left, On, Right&gt;</code>.
- * <P>
- * It is up to the client code to associate the 0 and 1 <code>TopologyLocation</code>s
- * with specific geometries.
- * @version 1.7
- *
- */
-public class Label {
-
-  // converts a Label to a Line label (that is, one with no side Locations)
-  public static Label toLineLabel(Label label)
-  {
-    Label lineLabel = new Label(Location.NONE);
-    for (int i = 0; i < 2; i++) {
-      lineLabel.setLocation(i, label.getLocation(i));
-    }
-    return lineLabel;
-  }
-
-  TopologyLocation elt[] = new TopologyLocation[2];
-
-  /**
-   * Construct a Label with a single location for both Geometries.
-   * Initialize the locations to Null
-   */
-  public Label(int onLoc)
-  {
-    elt[0] = new TopologyLocation(onLoc);
-    elt[1] = new TopologyLocation(onLoc);
-  }
-  /**
-   * Construct a Label with a single location for both Geometries.
-   * Initialize the location for the Geometry index.
-   */
-  public Label(int geomIndex, int onLoc)
-  {
-    elt[0] = new TopologyLocation(Location.NONE);
-    elt[1] = new TopologyLocation(Location.NONE);
-    elt[geomIndex].setLocation(onLoc);
-  }
-  /**
-   * Construct a Label with On, Left and Right locations for both Geometries.
-   * Initialize the locations for both Geometries to the given values.
-   */
-  public Label(int onLoc, int leftLoc, int rightLoc)
-  {
-    elt[0] = new TopologyLocation(onLoc, leftLoc, rightLoc);
-    elt[1] = new TopologyLocation(onLoc, leftLoc, rightLoc);
-  }
-  /**
-   * Construct a Label with On, Left and Right locations for both Geometries.
-   * Initialize the locations for the given Geometry index.
-   */
-  public Label(int geomIndex, int onLoc, int leftLoc, int rightLoc)
-  {
-    elt[0] = new TopologyLocation(Location.NONE, Location.NONE, Location.NONE);
-    elt[1] = new TopologyLocation(Location.NONE, Location.NONE, Location.NONE);
-    elt[geomIndex].setLocations(onLoc, leftLoc, rightLoc);
-  }
-  /**
-   * Construct a Label with the same values as the argument Label.
-   */
-  public Label(Label lbl)
-  {
-    elt[0] = new TopologyLocation(lbl.elt[0]);
-    elt[1] = new TopologyLocation(lbl.elt[1]);
-  }
-
-  public void flip()
-  {
-    elt[0].flip();
-    elt[1].flip();
-  }
-
-  public int getLocation(int geomIndex, int posIndex) { return elt[geomIndex].get(posIndex); }
-  public int getLocation(int geomIndex) { return elt[geomIndex].get(Position.ON); }
-  public void setLocation(int geomIndex, int posIndex, int location)
-  {
-    elt[geomIndex].setLocation(posIndex, location);
-  }
-  public void setLocation(int geomIndex, int location)
-  {
-    elt[geomIndex].setLocation(Position.ON, location);
-  }
-  public void setAllLocations(int geomIndex, int location)
-  {
-    elt[geomIndex].setAllLocations(location);
-  }
-  public void setAllLocationsIfNull(int geomIndex, int location)
-  {
-    elt[geomIndex].setAllLocationsIfNull(location);
-  }
-  /**
-   * Merge this label with another one.
-   * Merging updates any null attributes of this label with the attributes from lbl
-   */
-  public void merge(Label lbl)
-  {
-    for (int i = 0; i < 2; i++) {
-      if (elt[i] == null && lbl.elt[i] != null) {
-        elt[i] = new TopologyLocation(lbl.elt[i]);
-      }
-      else {
-        elt[i].merge(lbl.elt[i]);
-      }
-    }
-  }
-  public int getGeometryCount()
-  {
-    int count = 0;
-    if (! elt[0].isNull()) count++;
-    if (! elt[1].isNull()) count++;
-    return count;
-  }
-  public boolean isNull(int geomIndex) { return elt[geomIndex].isNull(); }
-  public boolean isAnyNull(int geomIndex) { return elt[geomIndex].isAnyNull(); }
-
-  public boolean isArea()               { return elt[0].isArea() || elt[1].isArea();   }
-  public boolean isArea(int geomIndex)  
-  {
-  	/*  Testing
-  	if (elt[0].getLocations().length != elt[1].getLocations().length) {
-  		System.out.println(this);
-  	}
-  		*/
-  	return elt[geomIndex].isArea();   
-  }
-  public boolean isLine(int geomIndex)  { return elt[geomIndex].isLine();   }
-
-  public boolean allPositionsEqual(int geomIndex, int loc)
-  {
-    return elt[geomIndex].allPositionsEqual(loc);
-  }
-  /**
-   * Converts one GeometryLocation to a Line location
-   */
-  public void toLine(int geomIndex)
-  {
-    if (elt[geomIndex].isArea())
-      elt[geomIndex] = new TopologyLocation(elt[geomIndex].location[0]);
-  }
-  public String toString()
-  {
-    StringBuffer buf = new StringBuffer();
-    if (elt[0] != null) {
-      buf.append("A:");
-      buf.append(elt[0].toString());
-    }
-    if (elt[1] != null) {
-      buf.append(" B:");
-      buf.append(elt[1].toString());
-    }
-    return buf.toString();
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/Node.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/Node.java	(revision 28245)
+++ 	(revision )
@@ -1,128 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import java.util.Iterator;
-
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.IntersectionMatrix;
-import com.vividsolutions.jts.geom.Location;
-
-
-/**
- * @version 1.7
- */
-public class Node
-  extends GraphComponent
-{
-  protected Coordinate coord; // only non-null if this node is precise
-  protected EdgeEndStar edges;
-
-  public Node(Coordinate coord, EdgeEndStar edges)
-  {
-    this.coord = coord;
-    this.edges = edges;
-    label = new Label(0, Location.NONE);
-  }
-
-  public Coordinate getCoordinate() { return coord; }
-  public EdgeEndStar getEdges() { return edges; }
-
-  /**
-   * Tests whether any incident edge is flagged as
-   * being in the result.
-   * This test can be used to determine if the node is in the result,
-   * since if any incident edge is in the result, the node must be in the result as well.
-   *
-   * @return <code>true</code> if any indicident edge in the in the result
-   */
-  public boolean isIncidentEdgeInResult()
-  {
-    for (Iterator it = getEdges().getEdges().iterator(); it.hasNext(); ) {
-      DirectedEdge de = (DirectedEdge) it.next();
-      if (de.getEdge().isInResult())
-        return true;
-    }
-    return false;
-  }
-
-  public boolean isIsolated()
-  {
-    return (label.getGeometryCount() == 1);
-  }
-  /**
-   * Basic nodes do not compute IMs
-   */
-  protected void computeIM(IntersectionMatrix im) {}
-  /**
-   * Add the edge to the list of edges at this node
-   */
-  public void add(EdgeEnd e)
-  {
-    // Assert: start pt of e is equal to node point
-    edges.insert(e);
-    e.setNode(this);
-  }
-
-  public void setLabel(int argIndex, int onLocation)
-  {
-    if (label == null) {
-      label = new Label(argIndex, onLocation);
-    }
-    else
-      label.setLocation(argIndex, onLocation);
-  }
-
-  /**
-   * Updates the label of a node to BOUNDARY,
-   * obeying the mod-2 boundaryDetermination rule.
-   */
-  public void setLabelBoundary(int argIndex)
-  {
-    // determine the current location for the point (if any)
-    int loc = Location.NONE;
-    if (label != null)
-      loc = label.getLocation(argIndex);
-    // flip the loc
-    int newLoc;
-    switch (loc) {
-    case Location.BOUNDARY: newLoc = Location.INTERIOR; break;
-    case Location.INTERIOR: newLoc = Location.BOUNDARY; break;
-    default: newLoc = Location.BOUNDARY;  break;
-    }
-    label.setLocation(argIndex, newLoc);
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/NodeFactory.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/NodeFactory.java	(revision 28245)
+++ 	(revision )
@@ -1,50 +1,0 @@
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-import com.vividsolutions.jts.geom.Coordinate;
-
-
-/**
- * @version 1.7
- */
-public class NodeFactory {
-/**
- * The basic node constructor does not allow for incident edges
- */
-  public Node createNode(Coordinate coord)
-  {
-    return new Node(coord, null);
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/NodeMap.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/NodeMap.java	(revision 28245)
+++ 	(revision )
@@ -1,122 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.TreeMap;
-
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Location;
-
-/**
- * A map of nodes, indexed by the coordinate of the node
- * @version 1.7
- */
-public class NodeMap
-
-{
-  //Map nodeMap = new HashMap();
-  Map nodeMap = new TreeMap();
-  NodeFactory nodeFact;
-
-  public NodeMap(NodeFactory nodeFact) {
-    this.nodeFact = nodeFact;
-  }
-
-  /**
-   * Factory function - subclasses can override to create their own types of nodes
-   */
-   /*
-  protected Node createNode(Coordinate coord)
-  {
-    return new Node(coord);
-  }
-  */
-  /**
-   * This method expects that a node has a coordinate value.
-   */
-  public Node addNode(Coordinate coord)
-  {
-    Node node = (Node) nodeMap.get(coord);
-    if (node == null) {
-      node = nodeFact.createNode(coord);
-      nodeMap.put(coord, node);
-    }
-    return node;
-  }
-
-
-  /**
-   * Adds a node for the start point of this EdgeEnd
-   * (if one does not already exist in this map).
-   * Adds the EdgeEnd to the (possibly new) node.
-   */
-  public void add(EdgeEnd e)
-  {
-    Coordinate p = e.getCoordinate();
-    Node n = addNode(p);
-    n.add(e);
-  }
-  /**
-   * @return the node if found; null otherwise
-   */
-  public Node find(Coordinate coord)  {    return (Node) nodeMap.get(coord);  }
-
-  public Iterator iterator()
-  {
-    return nodeMap.values().iterator();
-  }
-  public Collection values()
-  {
-    return nodeMap.values();
-  }
-
-  public Collection getBoundaryNodes(int geomIndex)
-  {
-    Collection bdyNodes = new ArrayList();
-    for (Iterator i = iterator(); i.hasNext(); ) {
-      Node node = (Node) i.next();
-      if (node.getLabel().getLocation(geomIndex) == Location.BOUNDARY)
-        bdyNodes.add(node);
-    }
-    return bdyNodes;
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/PlanarGraph.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/PlanarGraph.java	(revision 28245)
+++ 	(revision )
@@ -1,207 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-/**
- * @version 1.7
- */
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import com.vividsolutions.jts.algorithm.CGAlgorithms;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Location;
-
-/**
- * The computation of the <code>IntersectionMatrix</code> relies on the use of a structure
- * called a "topology graph".  The topology graph contains nodes and edges
- * corresponding to the nodes and line segments of a <code>Geometry</code>. Each
- * node and edge in the graph is labeled with its topological location relative to
- * the source geometry.
- * <P>
- * Note that there is no requirement that points of self-intersection be a vertex.
- * Thus to obtain a correct topology graph, <code>Geometry</code>s must be
- * self-noded before constructing their graphs.
- * <P>
- * Two fundamental operations are supported by topology graphs:
- * <UL>
- *   <LI>Computing the intersections between all the edges and nodes of a single graph
- *   <LI>Computing the intersections between the edges and nodes of two different graphs
- * </UL>
- *
- * @version 1.7
- */
-public class PlanarGraph
-{
-  /**
-   * For nodes in the Collection, link the DirectedEdges at the node that are in the result.
-   * This allows clients to link only a subset of nodes in the graph, for
-   * efficiency (because they know that only a subset is of interest).
-   */
-  public static void linkResultDirectedEdges(Collection nodes)
-  {
-    for (Iterator nodeit = nodes.iterator(); nodeit.hasNext(); ) {
-      Node node = (Node) nodeit.next();
-      ((DirectedEdgeStar) node.getEdges()).linkResultDirectedEdges();
-    }
-  }
-
-  protected List edges        = new ArrayList();
-  protected NodeMap nodes;
-  protected List edgeEndList  = new ArrayList();
-
-  public PlanarGraph(NodeFactory nodeFact) {
-    nodes = new NodeMap(nodeFact);
-  }
-
-  public PlanarGraph() {
-    nodes = new NodeMap(new NodeFactory());
-  }
-
-  public Iterator getEdgeIterator() { return edges.iterator(); }
-  public Collection getEdgeEnds() { return edgeEndList; }
-
-  public boolean isBoundaryNode(int geomIndex, Coordinate coord)
-  {
-    Node node = nodes.find(coord);
-    if (node == null) return false;
-    Label label = node.getLabel();
-    if (label != null && label.getLocation(geomIndex) == Location.BOUNDARY) return true;
-    return false;
-  }
-  protected void insertEdge(Edge e)
-  {
-    edges.add(e);
-  }
-  public void add(EdgeEnd e)
-  {
-    nodes.add(e);
-    edgeEndList.add(e);
-  }
-
-  public Iterator getNodeIterator() { return nodes.iterator(); }
-  public Collection getNodes() { return nodes.values(); }
-  public Node addNode(Coordinate coord) { return nodes.addNode(coord); }
-
-  /**
-   * Add a set of edges to the graph.  For each edge two DirectedEdges
-   * will be created.  DirectedEdges are NOT linked by this method.
-   */
-  public void addEdges(List edgesToAdd)
-  {
-    // create all the nodes for the edges
-    for (Iterator it = edgesToAdd.iterator(); it.hasNext(); ) {
-      Edge e = (Edge) it.next();
-      edges.add(e);
-
-      DirectedEdge de1 = new DirectedEdge(e, true);
-      DirectedEdge de2 = new DirectedEdge(e, false);
-      de1.setSym(de2);
-      de2.setSym(de1);
-
-      add(de1);
-      add(de2);
-    }
-  }
-
-  /**
-   * Link the DirectedEdges at the nodes of the graph.
-   * This allows clients to link only a subset of nodes in the graph, for
-   * efficiency (because they know that only a subset is of interest).
-   */
-  public void linkResultDirectedEdges()
-  {
-    for (Iterator nodeit = nodes.iterator(); nodeit.hasNext(); ) {
-      Node node = (Node) nodeit.next();
-      ((DirectedEdgeStar) node.getEdges()).linkResultDirectedEdges();
-    }
-  }
-  /**
-   * Returns the EdgeEnd which has edge e as its base edge
-   * (MD 18 Feb 2002 - this should return a pair of edges)
-   *
-   * @return the edge, if found
-   *    <code>null</code> if the edge was not found
-   */
-  public EdgeEnd findEdgeEnd(Edge e)
-  {
-    for (Iterator i = getEdgeEnds().iterator(); i.hasNext(); ) {
-      EdgeEnd ee = (EdgeEnd) i.next();
-      if (ee.getEdge() == e)
-        return ee;
-    }
-    return null;
-  }
-
-  /**
-   * Returns the edge which starts at p0 and whose first segment is
-   * parallel to p1
-   *
-   * @return the edge, if found
-   *    <code>null</code> if the edge was not found
-   */
-  public Edge findEdgeInSameDirection(Coordinate p0, Coordinate p1)
-  {
-    for (int i = 0; i < edges.size(); i++) {
-      Edge e = (Edge) edges.get(i);
-
-      Coordinate[] eCoord = e.getCoordinates();
-      if (matchInSameDirection(p0, p1, eCoord[0], eCoord[1]) )
-        return e;
-
-      if (matchInSameDirection(p0, p1, eCoord[eCoord.length - 1], eCoord[eCoord.length - 2]) )
-        return e;
-    }
-    return null;
-  }
-
-  /**
-   * The coordinate pairs match if they define line segments lying in the same direction.
-   * E.g. the segments are parallel and in the same quadrant
-   * (as opposed to parallel and opposite!).
-   */
-  private boolean matchInSameDirection(Coordinate p0, Coordinate p1, Coordinate ep0, Coordinate ep1)
-  {
-    if (! p0.equals(ep0))
-      return false;
-
-    if (CGAlgorithms.computeOrientation(p0, p1, ep1) == CGAlgorithms.COLLINEAR
-         && Quadrant.quadrant(p0, p1) == Quadrant.quadrant(ep0, ep1) )
-      return true;
-    return false;
-  }
-
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/Position.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/Position.java	(revision 28245)
+++ 	(revision )
@@ -1,52 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-/**
- * A Position indicates the position of a Location relative to a graph component
- * (Node, Edge, or Area).
- * @version 1.7
- */
-public class Position {
-
-  /** An indicator that a Location is <i>on</i> a GraphComponent */
-  public static final int ON      = 0;
-  /** An indicator that a Location is to the <i>left</i> of a GraphComponent */  
-  public static final int LEFT    = 1;
-  /** An indicator that a Location is to the <i>right</i> of a GraphComponent */  
-  public static final int RIGHT   = 2;
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/Quadrant.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/Quadrant.java	(revision 28245)
+++ 	(revision )
@@ -1,108 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-/**
- * @version 1.7
- */
-import com.vividsolutions.jts.geom.Coordinate;
-
-/**
- * Utility functions for working with quadrants, which are numbered as follows:
- * <pre>
- * 1 | 0
- * --+--
- * 2 | 3
- * <pre>
- *
- * @version 1.7
- */
-public class Quadrant 
-{
-	public static final int NE = 0;
-	public static final int NW = 1;
-	public static final int SW = 2;
-	public static final int SE = 3;
-	
-  /**
-   * Returns the quadrant of a directed line segment (specified as x and y
-   * displacements, which cannot both be 0).
-   * 
-   * @throws IllegalArgumentException if the displacements are both 0
-   */
-  public static int quadrant(double dx, double dy)
-  {
-    if (dx == 0.0 && dy == 0.0)
-      throw new IllegalArgumentException("Cannot compute the quadrant for point ( "+ dx + ", " + dy + " )" );
-    if (dx >= 0.0) {
-      if (dy >= 0.0)
-        return NE;
-      else
-        return SE;
-    }
-    else {
-    	if (dy >= 0.0)
-    		return NW;
-    	else
-    		return SW;
-    }
-  }
-
-  /**
-   * Returns the quadrant of a directed line segment from p0 to p1.
-   * 
-   * @throws IllegalArgumentException if the points are equal
-   */
-  public static int quadrant(Coordinate p0, Coordinate p1)
-  {
-    if (p1.x == p0.x && p1.y == p0.y)
-      throw new IllegalArgumentException("Cannot compute the quadrant for two identical points " + p0);
-    
-    if (p1.x >= p0.x) {
-      if (p1.y >= p0.y)
-        return NE;
-      else
-        return SE;
-    }
-    else {
-    	if (p1.y >= p0.y)
-    		return NW;
-    	else
-    		return SW;
-    }
-  }
-    
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/TopologyLocation.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/TopologyLocation.java	(revision 28245)
+++ 	(revision )
@@ -1,198 +1,0 @@
-
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.geomgraph;
-
-
-
-import com.vividsolutions.jts.geom.Location;
-
-/**
-  * A TopologyLocation is the labelling of a
-  * GraphComponent's topological relationship to a single Geometry.
-  * <p>
-  * If the parent component is an area edge, each side and the edge itself
-  * have a topological location.  These locations are named
-  * <ul>
-  * <li> ON: on the edge
-  * <li> LEFT: left-hand side of the edge
-  * <li> RIGHT: right-hand side
-  * </ul>
-  * If the parent component is a line edge or node, there is a single
-  * topological relationship attribute, ON.
-  * <p>
-  * The possible values of a topological location are
-  * {Location.NONE, Location.EXTERIOR, Location.BOUNDARY, Location.INTERIOR}
-  * <p>
-  * The labelling is stored in an array location[j] where
-  * where j has the values ON, LEFT, RIGHT
-  * @version 1.7
- */
-public class TopologyLocation {
-
-  int location[];
-
-  /**
-   * Constructs a TopologyLocation specifying how points on, to the left of, and to the
-   * right of some GraphComponent relate to some Geometry. Possible values for the
-   * parameters are Location.NULL, Location.EXTERIOR, Location.BOUNDARY,
-   * and Location.INTERIOR.
-   * @see Location
-   */
-  public TopologyLocation(int on, int left, int right) {
-   init(3);
-   location[Position.ON] = on;
-   location[Position.LEFT] = left;
-   location[Position.RIGHT] = right;
-  }
-
-  public TopologyLocation(int on) {
-   init(1);
-   location[Position.ON] = on;
-  }
-  public TopologyLocation(TopologyLocation gl) {
-    if (gl != null) {
-      init(gl.location.length);
-      for (int i = 0; i < location.length; i++) {
-        location[i] = gl.location[i];
-      }
-    }
-  }
-  private void init(int size)
-  {
-    location = new int[size];
-    setAllLocations(Location.NONE);
-  }
-  public int get(int posIndex)
-  {
-    if (posIndex < location.length) return location[posIndex];
-    return Location.NONE;
-  }
-  /**
-   * @return true if all locations are NULL
-   */
-  public boolean isNull()
-  {
-    for (int i = 0; i < location.length; i++) {
-      if (location[i] != Location.NONE) return false;
-    }
-    return true;
-  }
-  /**
-   * @return true if any locations are NULL
-   */
-  public boolean isAnyNull()
-  {
-    for (int i = 0; i < location.length; i++) {
-      if (location[i] == Location.NONE) return true;
-    }
-    return false;
-  }
-
-  public boolean isArea() { return location.length > 1; }
-  public boolean isLine() { return location.length == 1; }
-
-  public void flip()
-  {
-    if (location.length <= 1) return;
-    int temp = location[Position.LEFT];
-    location[Position.LEFT] = location[Position.RIGHT];
-    location[Position.RIGHT] = temp;
-  }
-
-
-  public void setAllLocations(int locValue)
-  {
-    for (int i = 0; i < location.length; i++) {
-      location[i]     = locValue;
-    }
-  }
-  public void setAllLocationsIfNull(int locValue)
-  {
-    for (int i = 0; i < location.length; i++) {
-      if (location[i] == Location.NONE) location[i]     = locValue;
-    }
-  }
-
-  public void setLocation(int locIndex, int locValue)
-  {
-      location[locIndex] = locValue;
-  }
-  public void setLocation(int locValue)
-  {
-    setLocation(Position.ON, locValue);
-  }
-  public void setLocations(int on, int left, int right) {
-      location[Position.ON] = on;
-      location[Position.LEFT] = left;
-      location[Position.RIGHT] = right;
-  }
-  public boolean allPositionsEqual(int loc)
-  {
-    for (int i = 0; i < location.length; i++) {
-      if (location[i] != loc) return false;
-    }
-    return true;
-  }
-
-  /**
-   * merge updates only the NULL attributes of this object
-   * with the attributes of another.
-   */
-  public void merge(TopologyLocation gl)
-  {
-    // if the src is an Area label & and the dest is not, increase the dest to be an Area
-    if (gl.location.length > location.length) {
-      int [] newLoc = new int[3];
-      newLoc[Position.ON] = location[Position.ON];
-      newLoc[Position.LEFT] = Location.NONE;
-      newLoc[Position.RIGHT] = Location.NONE;
-      location = newLoc;
-    }
-    for (int i = 0; i < location.length; i++) {
-      if (location[i] == Location.NONE && i < gl.location.length)
-        location[i] = gl.location[i];
-    }
-  }
-
-  public String toString()
-  {
-    StringBuffer buf = new StringBuffer();
-    if (location.length > 1) buf.append(Location.toLocationSymbol(location[Position.LEFT]));
-    buf.append(Location.toLocationSymbol(location[Position.ON]));
-    if (location.length > 1) buf.append(Location.toLocationSymbol(location[Position.RIGHT]));
-    return buf.toString();
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/package.html
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/geomgraph/package.html	(revision 28245)
+++ 	(revision )
@@ -1,25 +1,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
-
--->
-</head>
-<body bgcolor="white">
-
-Contains classes that implement topology graphs.
-<P>
-The Java Topology Suite (JTS) is a Java API that implements a core set of spatial data operations using an explicit precision model and robust geometric algorithms. JTS is intended to be used in the development of applications that support the validation, cleaning, integration and querying of spatial datasets.
-<P>
-JTS attempts to implement the OpenGIS Simple Features Specification (SFS) as accurately as possible.  In some cases the SFS is unclear or omits a specification; in this case JTS attempts to choose a reasonable and consistent alternative.  Differences from and elaborations of the SFS are documented in this specification.
-
-<h2>Package Specification</h2>
-
-<ul>
-  <li>Java Topology Suite Technical Specifications
-  <li><A HREF="http://www.opengis.org/techno/specs.htm">
-      OpenGIS Simple Features Specification for SQL</A>
-</ul>
-
-</body>
-</html>
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/index/ArrayListVisitor.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/index/ArrayListVisitor.java	(revision 28245)
+++ 	(revision )
@@ -1,23 +1,0 @@
-package com.vividsolutions.jts.index;
-
-import java.util.ArrayList;
-
-/**
- * @version 1.7
- */
-public class ArrayListVisitor
-    implements ItemVisitor
-{
-
-  private ArrayList items = new ArrayList();
-  public ArrayListVisitor() {
-  }
-
-  public void visitItem(Object item)
-  {
-    items.add(item);
-  }
-
-  public ArrayList getItems() { return items; }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/index/ItemVisitor.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/index/ItemVisitor.java	(revision 28245)
+++ 	(revision )
@@ -1,12 +1,0 @@
-package com.vividsolutions.jts.index;
-
-/**
- * A visitor for items in an index.
- *
- * @version 1.7
- */
-
-public interface ItemVisitor
-{
-  void visitItem(Object item);
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/index/SpatialIndex.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/index/SpatialIndex.java	(revision 28245)
+++ 	(revision )
@@ -1,88 +1,0 @@
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.index;
-
-import java.util.List;
-
-import com.vividsolutions.jts.geom.Envelope;
-
-/**
- * The basic operations supported by classes
- * implementing spatial index algorithms.
- * <p>
- * A spatial index typically provides a primary filter for range rectangle queries.
- * A secondary filter is required to test for exact intersection.
- * The secondary filter may consist of other kinds of tests,
- * such as testing other spatial relationships.
- *
- * @version 1.7
- */
-public interface SpatialIndex
-{
-  /**
-   * Adds a spatial item with an extent specified by the given {@link Envelope} to the index
-   */
-  void insert(Envelope itemEnv, Object item);
-
-  /**
-   * Queries the index for all items whose extents intersect the given search {@link Envelope}
-   * Note that some kinds of indexes may also return objects which do not in fact
-   * intersect the query envelope.
-   *
-   * @param searchEnv the envelope to query for
-   * @return a list of the items found by the query
-   */
-  List query(Envelope searchEnv);
-
-  /**
-   * Queries the index for all items whose extents intersect the given search {@link Envelope},
-   * and applies an {@link ItemVisitor} to them.
-   * Note that some kinds of indexes may also return objects which do not in fact
-   * intersect the query envelope.
-   *
-   * @param searchEnv the envelope to query for
-   * @param visitor a visitor object to apply to the items found
-   */
-  void query(Envelope searchEnv, ItemVisitor visitor);
-
-  /**
-   * Removes a single item from the tree.
-   *
-   * @param itemEnv the Envelope of the item to remove
-   * @param item the item to remove
-   * @return <code>true</code> if the item was found
-   */
-  boolean remove(Envelope itemEnv, Object item);
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/index/package.html
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/index/package.html	(revision 28245)
+++ 	(revision )
@@ -1,13 +1,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
-
--->
-</head>
-<body bgcolor="white">
-
-Provides classes for various kinds of spatial indexes.
-
-</body>
-</html>
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/BoundaryOp.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/BoundaryOp.java	(revision 28245)
+++ 	(revision )
@@ -1,192 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.operation;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import com.vividsolutions.jts.algorithm.BoundaryNodeRule;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.CoordinateArrays;
-import com.vividsolutions.jts.geom.CoordinateSequence;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.GeometryCollection;
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geom.LineString;
-import com.vividsolutions.jts.geom.MultiLineString;
-import com.vividsolutions.jts.geom.MultiPoint;
-import com.vividsolutions.jts.geom.Point;
-
-/**
- * Computes the boundary of a {@link Geometry}.
- * Allows specifying the {@link BoundaryNodeRule} to be used.
- * This operation will always return a {@link Geometry} of the appropriate
- * dimension for the boundary (even if the input geometry is empty).
- * The boundary of zero-dimensional geometries (Points) is
- * always the empty {@link GeometryCollection}.
- *
- * @author Martin Davis
- * @version 1.7
- */
-
-public class BoundaryOp
-{
-  private Geometry geom;
-  private GeometryFactory geomFact;
-  private BoundaryNodeRule bnRule;
-
-  public BoundaryOp(Geometry geom)
-  {
-    this(geom, BoundaryNodeRule.MOD2_BOUNDARY_RULE);
-  }
-
-  public BoundaryOp(Geometry geom, BoundaryNodeRule bnRule)
-  {
-    this.geom = geom;
-    geomFact = geom.getFactory();
-    this.bnRule = bnRule;
-  }
-
-  public Geometry getBoundary()
-  {
-    if (geom instanceof LineString) return boundaryLineString((LineString) geom);
-    if (geom instanceof MultiLineString) return boundaryMultiLineString((MultiLineString) geom);
-    return geom.getBoundary();
-  }
-
-  private MultiPoint getEmptyMultiPoint()
-  {
-    return geomFact.createMultiPoint((CoordinateSequence) null);
-  }
-
-  private Geometry boundaryMultiLineString(MultiLineString mLine)
-  {
-    if (geom.isEmpty()) {
-      return getEmptyMultiPoint();
-    }
-
-    Coordinate[] bdyPts = computeBoundaryCoordinates(mLine);
-
-    // return Point or MultiPoint
-    if (bdyPts.length == 1) {
-      return geomFact.createPoint(bdyPts[0]);
-    }
-    // this handles 0 points case as well
-    return geomFact.createMultiPoint(bdyPts);
-  }
-
-/*
-// MD - superseded
-  private Coordinate[] computeBoundaryFromGeometryGraph(MultiLineString mLine)
-  {
-    GeometryGraph g = new GeometryGraph(0, mLine, bnRule);
-    Coordinate[] bdyPts = g.getBoundaryPoints();
-    return bdyPts;
-  }
-*/
-
-  private Map endpointMap;
-
-  private Coordinate[] computeBoundaryCoordinates(MultiLineString mLine)
-  {
-    List bdyPts = new ArrayList();
-    endpointMap = new TreeMap();
-    for (int i = 0; i < mLine.getNumGeometries(); i++) {
-      LineString line = (LineString) mLine.getGeometryN(i);
-      if (line.getNumPoints() == 0)
-        continue;
-      addEndpoint(line.getCoordinateN(0));
-      addEndpoint(line.getCoordinateN(line.getNumPoints() - 1));
-    }
-
-    for (Iterator it = endpointMap.entrySet().iterator(); it.hasNext(); ) {
-      Map.Entry entry = (Map.Entry) it.next();
-      Counter counter = (Counter) entry.getValue();
-      int valence = counter.count;
-      if (bnRule.isInBoundary(valence)) {
-        bdyPts.add(entry.getKey());
-      }
-    }
-
-    return CoordinateArrays.toCoordinateArray(bdyPts);
-  }
-
-  private void addEndpoint(Coordinate pt)
-  {
-    Counter counter = (Counter) endpointMap.get(pt);
-    if (counter == null) {
-      counter = new Counter();
-      endpointMap.put(pt, counter);
-    }
-    counter.count++;
-  }
-
-  private Geometry boundaryLineString(LineString line)
-  {
-    if (geom.isEmpty()) {
-      return getEmptyMultiPoint();
-    }
-
-    if (line.isClosed()) {
-      // check whether endpoints of valence 2 are on the boundary or not
-      boolean closedEndpointOnBoundary = bnRule.isInBoundary(2);
-      if (closedEndpointOnBoundary) {
-        return line.getStartPoint();
-      }
-      else {
-        return geomFact.createMultiPoint((Coordinate[]) null);
-      }
-    }
-    return geomFact.createMultiPoint(new Point[]{
-                                     line.getStartPoint(),
-                                     line.getEndPoint()
-    });
-  }
-}
-
-/**
- * Stores an integer count, for use as a Map entry.
- *
- * @author Martin Davis
- * @version 1.7
- */
-class Counter
-{
-  /**
-   * The value of the count
-   */
-  int count;
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/GeometryGraphOperation.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/GeometryGraphOperation.java	(revision 28245)
+++ 	(revision )
@@ -1,85 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.operation;
-
-import com.vividsolutions.jts.algorithm.BoundaryNodeRule;
-import com.vividsolutions.jts.algorithm.LineIntersector;
-import com.vividsolutions.jts.algorithm.RobustLineIntersector;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.PrecisionModel;
-import com.vividsolutions.jts.geomgraph.GeometryGraph;
-
-/**
- * The base class for operations that require {@link GeometryGraph}s.
- *
- * @version 1.7
- */
-public class GeometryGraphOperation
-{
-  protected final LineIntersector li = new RobustLineIntersector();
-  protected PrecisionModel resultPrecisionModel;
-
-  /**
-   * The operation args into an array so they can be accessed by index
-   */
-  protected GeometryGraph[] arg;  // the arg(s) of the operation
-
-  public GeometryGraphOperation(Geometry g0, Geometry g1)
-  {
-    this(g0, g1,
-         BoundaryNodeRule.OGC_SFS_BOUNDARY_RULE
-//         BoundaryNodeRule.ENDPOINT_BOUNDARY_RULE
-         );
-  }
-
-  public GeometryGraphOperation(Geometry g0, Geometry g1, BoundaryNodeRule boundaryNodeRule)
-  {
-    // use the most precise model for the result
-    if (g0.getPrecisionModel().compareTo(g1.getPrecisionModel()) >= 0)
-      setComputationPrecision(g0.getPrecisionModel());
-    else
-      setComputationPrecision(g1.getPrecisionModel());
-
-    arg = new GeometryGraph[2];
-    arg[0] = new GeometryGraph(0, g0, boundaryNodeRule);
-    arg[1] = new GeometryGraph(1, g1, boundaryNodeRule);
-  }
-
-  protected void setComputationPrecision(PrecisionModel pm)
-  {
-    resultPrecisionModel = pm;
-    li.setPrecisionModel(resultPrecisionModel);
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/IsSimpleOp.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/IsSimpleOp.java	(revision 28245)
+++ 	(revision )
@@ -1,230 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.operation;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import com.vividsolutions.jts.algorithm.BoundaryNodeRule;
-import com.vividsolutions.jts.algorithm.LineIntersector;
-import com.vividsolutions.jts.algorithm.RobustLineIntersector;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.LineString;
-import com.vividsolutions.jts.geom.MultiLineString;
-import com.vividsolutions.jts.geom.MultiPoint;
-import com.vividsolutions.jts.geom.Point;
-import com.vividsolutions.jts.geomgraph.Edge;
-import com.vividsolutions.jts.geomgraph.EdgeIntersection;
-import com.vividsolutions.jts.geomgraph.GeometryGraph;
-import com.vividsolutions.jts.geomgraph.index.SegmentIntersector;
-
-/**
- * Tests whether a <code>Geometry</code> is simple.
- * In general, the SFS specification of simplicity
- * follows the rule:
- * <ul>
- *    <li> A Geometry is simple if and only if the only self-intersections are at
- *    boundary points.
- * </ul>
- * This definition relies on the definition of boundary points.
- * The SFS uses the Mod-2 rule to determine which points are on the boundary of
- * lineal geometries, but this class supports
- * using other {@link BoundaryNodeRule}s as well.
- * <p>
- * Simplicity is defined for each {@link Geometry} subclass as follows:
- * <ul>
- * <li>Valid polygonal geometries are simple by definition, so
- * <code>isSimple</code> trivially returns true.
- * (Hint: in order to check if a polygonal geometry has self-intersections,
- * use {@link Geometry#isValid}).
- * <li>Linear geometries are simple iff they do not self-intersect at points
- * other than boundary points. 
- * (Using the Mod-2 rule, this means that closed linestrings
- * cannot be touched at their endpoints, since these are
- * interior points, not boundary points).
- * <li>Zero-dimensional geometries (points) are simple iff they have no
- * repeated points.
- * <li>Empty <code>Geometry</code>s are always simple
- * </ul>
- *
- * @see BoundaryNodeRule
- *
- * @version 1.7
- */
-public class IsSimpleOp
-{
-  private Geometry geom;
-  private boolean isClosedEndpointsInInterior = true;
-
-
-  /**
-   * Creates a simplicity checker using the default SFS Mod-2 Boundary Node Rule
-   *
-   * @param geom the geometry to test
-   */
-  public IsSimpleOp(Geometry geom) {
-    this.geom = geom;
-  }
-
-  /**
-   * Tests whether the geometry is simple.
-   *
-   * @return true if the geometry is simple
-   */
-  public boolean isSimple()
-  {
-    if (geom instanceof LineString) return isSimpleLinearGeometry(geom);
-    if (geom instanceof MultiLineString) return isSimpleLinearGeometry(geom);
-    if (geom instanceof MultiPoint) return isSimpleMultiPoint((MultiPoint) geom);
-    // all other geometry types are simple by definition
-    return true;
-  }
-
-  private boolean isSimpleMultiPoint(MultiPoint mp)
-  {
-    if (mp.isEmpty()) return true;
-    Set points = new TreeSet();
-    for (int i = 0; i < mp.getNumGeometries(); i++) {
-      Point pt = (Point) mp.getGeometryN(i);
-      Coordinate p = pt.getCoordinate();
-      if (points.contains(p)) {
-        return false;
-      }
-      points.add(p);
-    }
-    return true;
-  }
-
-  private boolean isSimpleLinearGeometry(Geometry geom)
-  {
-    if (geom.isEmpty()) return true;
-    GeometryGraph graph = new GeometryGraph(0, geom);
-    LineIntersector li = new RobustLineIntersector();
-    SegmentIntersector si = graph.computeSelfNodes(li, true);
-    // if no self-intersection, must be simple
-    if (! si.hasIntersection()) return true;
-    if (si.hasProperIntersection()) {
-      return false;
-    }
-    if (hasNonEndpointIntersection(graph)) return false;
-    if (isClosedEndpointsInInterior) {
-      if (hasClosedEndpointIntersection(graph)) return false;
-    }
-    return true;
-  }
-
-  /**
-   * For all edges, check if there are any intersections which are NOT at an endpoint.
-   * The Geometry is not simple if there are intersections not at endpoints.
-   */
-  private boolean hasNonEndpointIntersection(GeometryGraph graph)
-  {
-    for (Iterator i = graph.getEdgeIterator(); i.hasNext(); ) {
-      Edge e = (Edge) i.next();
-      int maxSegmentIndex = e.getMaximumSegmentIndex();
-      for (Iterator eiIt = e.getEdgeIntersectionList().iterator(); eiIt.hasNext(); ) {
-        EdgeIntersection ei = (EdgeIntersection) eiIt.next();
-        if (! ei.isEndPoint(maxSegmentIndex)) {
-          return true;
-        }
-      }
-    }
-    return false;
-  }
-
-  private static class EndpointInfo {
-    boolean isClosed;
-    int degree;
-
-    public EndpointInfo()
-    {
-      isClosed = false;
-      degree = 0;
-    }
-
-    public void addEndpoint(boolean isClosed)
-    {
-      degree++;
-      this.isClosed |= isClosed;
-    }
-  }
-
-  /**
-   * Tests that no edge intersection is the endpoint of a closed line.
-   * This ensures that closed lines are not touched at their endpoint,
-   * which is an interior point according to the Mod-2 rule
-   * To check this we compute the degree of each endpoint.
-   * The degree of endpoints of closed lines
-   * must be exactly 2.
-   */
-  private boolean hasClosedEndpointIntersection(GeometryGraph graph)
-  {
-    Map endPoints = new TreeMap();
-    for (Iterator i = graph.getEdgeIterator(); i.hasNext(); ) {
-      Edge e = (Edge) i.next();
-      boolean isClosed = e.isClosed();
-      Coordinate p0 = e.getCoordinate(0);
-      addEndpoint(endPoints, p0, isClosed);
-      Coordinate p1 = e.getCoordinate(e.getNumPoints() - 1);
-      addEndpoint(endPoints, p1, isClosed);
-    }
-
-    for (Iterator i = endPoints.values().iterator(); i.hasNext(); ) {
-      EndpointInfo eiInfo = (EndpointInfo) i.next();
-      if (eiInfo.isClosed && eiInfo.degree != 2) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  /**
-   * Add an endpoint to the map, creating an entry for it if none exists
-   */
-  private void addEndpoint(Map endPoints, Coordinate p, boolean isClosed)
-  {
-    EndpointInfo eiInfo = (EndpointInfo) endPoints.get(p);
-    if (eiInfo == null) {
-      eiInfo = new EndpointInfo();
-      endPoints.put(p, eiInfo);
-    }
-    eiInfo.addEndpoint(isClosed);
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/LineBuilder.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/LineBuilder.java	(revision 28245)
+++ 	(revision )
@@ -1,180 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.operation.overlay;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geom.LineString;
-import com.vividsolutions.jts.geomgraph.DirectedEdge;
-import com.vividsolutions.jts.geomgraph.DirectedEdgeStar;
-import com.vividsolutions.jts.geomgraph.Edge;
-import com.vividsolutions.jts.geomgraph.Label;
-import com.vividsolutions.jts.geomgraph.Node;
-import com.vividsolutions.jts.util.Assert;
-
-/**
- * Forms JTS LineStrings out of a the graph of {@link DirectedEdge}s
- * created by an {@link OverlayOp}.
- *
- * @version 1.7
- */
-public class LineBuilder {
-  private OverlayOp op;
-  private GeometryFactory geometryFactory;
-
-  private List lineEdgesList    = new ArrayList();
-  private List resultLineList   = new ArrayList();
-
-  public LineBuilder(OverlayOp op, GeometryFactory geometryFactory) {
-    this.op = op;
-    this.geometryFactory = geometryFactory;
-  }
-  /**
-   * @return a list of the LineStrings in the result of the specified overlay operation
-   */
-  public List build(int opCode)
-  {
-    findCoveredLineEdges();
-    collectLines(opCode);
-    //labelIsolatedLines(lineEdgesList);
-    buildLines();
-    return resultLineList;
-  }
-  /**
-   * Find and mark L edges which are "covered" by the result area (if any).
-   * L edges at nodes which also have A edges can be checked by checking
-   * their depth at that node.
-   * L edges at nodes which do not have A edges can be checked by doing a
-   * point-in-polygon test with the previously computed result areas.
-   */
-  private void findCoveredLineEdges()
-  {
-    // first set covered for all L edges at nodes which have A edges too
-    for (Iterator nodeit = op.getGraph().getNodes().iterator(); nodeit.hasNext(); ) {
-      Node node = (Node) nodeit.next();
-//node.print(System.out);
-      ((DirectedEdgeStar) node.getEdges()).findCoveredLineEdges();
-    }
-
-    /**
-     * For all L edges which weren't handled by the above,
-     * use a point-in-poly test to determine whether they are covered
-     */
-    for (Iterator it = op.getGraph().getEdgeEnds().iterator(); it.hasNext(); ) {
-      DirectedEdge de = (DirectedEdge) it.next();
-      Edge e = de.getEdge();
-      if (de.isLineEdge() && ! e.isCoveredSet()) {
-        boolean isCovered = op.isCoveredByA(de.getCoordinate());
-        e.setCovered(isCovered);
-      }
-    }
-  }
-
-  private void collectLines(int opCode)
-  {
-    for (Iterator it = op.getGraph().getEdgeEnds().iterator(); it.hasNext(); ) {
-      DirectedEdge de = (DirectedEdge) it.next();
-      collectLineEdge(de, opCode, lineEdgesList);
-      collectBoundaryTouchEdge(de, opCode, lineEdgesList);
-    }
-  }
-
-  /**
-   * Collect line edges which are in the result.
-   * Line edges are in the result if they are not part of
-   * an area boundary, if they are in the result of the overlay operation,
-   * and if they are not covered by a result area.
-   *
-   * @param de the directed edge to test
-   * @param opCode the overlap operation
-   * @param edges the list of included line edges
-   */
-  private void collectLineEdge(DirectedEdge de, int opCode, List edges)
-  {
-    Label label = de.getLabel();
-    Edge e = de.getEdge();
-    // include L edges which are in the result
-    if (de.isLineEdge()) {
-      if (! de.isVisited() && OverlayOp.isResultOfOp(label, opCode) && ! e.isCovered()) {
-//Debug.println("de: " + de.getLabel());
-//Debug.println("edge: " + e.getLabel());
-
-        edges.add(e);
-        de.setVisitedEdge(true);
-      }
-    }
-  }
-
-  /**
-   * Collect edges from Area inputs which should be in the result but
-   * which have not been included in a result area.
-   * This happens ONLY:
-   * <ul>
-   * <li>during an intersection when the boundaries of two
-   * areas touch in a line segment
-   * <li> OR as a result of a dimensional collapse.
-   * </ul>
-   */
-  private void collectBoundaryTouchEdge(DirectedEdge de, int opCode, List edges)
-  {
-    Label label = de.getLabel();
-    if (de.isLineEdge()) return;  // only interested in area edges
-    if (de.isVisited()) return;  // already processed
-    if (de.isInteriorAreaEdge()) return;  // added to handle dimensional collapses
-    if (de.getEdge().isInResult()) return;  // if the edge linework is already included, don't include it again
-
-    // sanity check for labelling of result edgerings
-    Assert.isTrue(! (de.isInResult() || de.getSym().isInResult()) || ! de.getEdge().isInResult());
-
-    // include the linework if it's in the result of the operation
-    if (OverlayOp.isResultOfOp(label, opCode)
-          && opCode == OverlayOp.INTERSECTION)
-    {
-      edges.add(de.getEdge());
-      de.setVisitedEdge(true);
-    }
-  }
-
-  private void buildLines()
-  {
-    for (Iterator it = lineEdgesList.iterator(); it.hasNext(); ) {
-      Edge e = (Edge) it.next();
-        LineString line = geometryFactory.createLineString(e.getCoordinates());
-        resultLineList.add(line);
-        e.setInResult(true);
-    }
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/MaximalEdgeRing.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/MaximalEdgeRing.java	(revision 28245)
+++ 	(revision )
@@ -1,109 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.operation.overlay;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geomgraph.DirectedEdge;
-import com.vividsolutions.jts.geomgraph.DirectedEdgeStar;
-import com.vividsolutions.jts.geomgraph.EdgeRing;
-import com.vividsolutions.jts.geomgraph.Node;
-
-/**
- * A ring of {@link DirectedEdge}s which may contain nodes of degree > 2.
- * A <tt>MaximalEdgeRing</tt> may represent two different spatial entities:
- * <ul>
- * <li>a single polygon possibly containing inversions (if the ring is oriented CW)
- * <li>a single hole possibly containing exversions (if the ring is oriented CCW)
- * </ul>
- * If the MaximalEdgeRing represents a polygon,
- * the interior of the polygon is strongly connected.
- * <p>
- * These are the form of rings used to define polygons under some spatial data models.
- * However, under the OGC SFS model, {@link MinimalEdgeRing}s are required.
- * A MaximalEdgeRing can be converted to a list of MinimalEdgeRings using the
- * {@link #buildMinimalRings() } method.
- *
- * @version 1.7
- * @see com.vividsolutions.jts.operation.overlay.MinimalEdgeRing
- */
-public class MaximalEdgeRing
-  extends EdgeRing
-{
-
-  public MaximalEdgeRing(DirectedEdge start, GeometryFactory geometryFactory) {
-    super(start, geometryFactory);
-  }
-
-  public DirectedEdge getNext(DirectedEdge de)
-  {
-    return de.getNext();
-  }
-  public void setEdgeRing(DirectedEdge de, EdgeRing er)
-  {
-    de.setEdgeRing(er);
-  }
-
-  /**
-   * For all nodes in this EdgeRing,
-   * link the DirectedEdges at the node to form minimalEdgeRings
-   */
-  public void linkDirectedEdgesForMinimalEdgeRings()
-  {
-    DirectedEdge de = startDe;
-    do {
-      Node node = de.getNode();
-      ((DirectedEdgeStar) node.getEdges()).linkMinimalDirectedEdges(this);
-      de = de.getNext();
-    } while (de != startDe);
-  }
-
-  public List buildMinimalRings()
-  {
-    List minEdgeRings = new ArrayList();
-    DirectedEdge de = startDe;
-    do {
-      if (de.getMinEdgeRing() == null) {
-        EdgeRing minEr = new MinimalEdgeRing(de, geometryFactory);
-        minEdgeRings.add(minEr);
-      }
-      de = de.getNext();
-    } while (de != startDe);
-    return minEdgeRings;
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/MinimalEdgeRing.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/MinimalEdgeRing.java	(revision 28245)
+++ 	(revision )
@@ -1,67 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.operation.overlay;
-
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geomgraph.DirectedEdge;
-import com.vividsolutions.jts.geomgraph.Edge;
-import com.vividsolutions.jts.geomgraph.EdgeRing;
-
-/**
- * A ring of {@link Edge}s with the property that no node
- * has degree greater than 2.  These are the form of rings required
- * to represent polygons under the OGC SFS spatial data model.
- *
- * @version 1.7
- * @see com.vividsolutions.jts.operation.overlay.MaximalEdgeRing
- */
-public class MinimalEdgeRing
-  extends EdgeRing
-{
-
-  public MinimalEdgeRing(DirectedEdge start, GeometryFactory geometryFactory) {
-    super(start, geometryFactory);
-  }
-
-  public DirectedEdge getNext(DirectedEdge de)
-  {
-    return de.getNextMin();
-  }
-  public void setEdgeRing(DirectedEdge de, EdgeRing er)
-  {
-    de.setMinEdgeRing(er);
-  }
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/OverlayNodeFactory.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/OverlayNodeFactory.java	(revision 28245)
+++ 	(revision )
@@ -1,56 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.operation.overlay;
-
-/**
- * @version 1.7
- */
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geomgraph.*;
-
-/**
- * Creates nodes for use in the {@link PlanarGraph}s constructed during
- * overlay operations.
- *
- * @version 1.7
- */
-public class OverlayNodeFactory
-  extends NodeFactory
-{
-  public Node createNode(Coordinate coord)
-  {
-    return new Node(coord, new DirectedEdgeStar());
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/OverlayOp.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/OverlayOp.java	(revision 28245)
+++ 	(revision )
@@ -1,566 +1,0 @@
-
-
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.operation.overlay;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import com.vividsolutions.jts.algorithm.PointLocator;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geom.Location;
-import com.vividsolutions.jts.geomgraph.Depth;
-import com.vividsolutions.jts.geomgraph.DirectedEdge;
-import com.vividsolutions.jts.geomgraph.DirectedEdgeStar;
-import com.vividsolutions.jts.geomgraph.Edge;
-import com.vividsolutions.jts.geomgraph.EdgeList;
-import com.vividsolutions.jts.geomgraph.EdgeNodingValidator;
-import com.vividsolutions.jts.geomgraph.Label;
-import com.vividsolutions.jts.geomgraph.Node;
-import com.vividsolutions.jts.geomgraph.PlanarGraph;
-import com.vividsolutions.jts.geomgraph.Position;
-import com.vividsolutions.jts.operation.GeometryGraphOperation;
-import com.vividsolutions.jts.util.Assert;
-
-/**
- * Computes the overlay of two {@link Geometry}s.  The overlay
- * can be used to determine any boolean combination of the geometries.
- *
- * @version 1.7
- */
-public class OverlayOp
-  extends GeometryGraphOperation
-{
-/**
- * The spatial functions supported by this class.
- * These operations implement various boolean combinations of the resultants of the overlay.
- */
-  public static final int INTERSECTION  = 1;
-  public static final int UNION         = 2;
-  public static final int DIFFERENCE    = 3;
-  public static final int SYMDIFFERENCE = 4;
-
-  public static Geometry overlayOp(Geometry geom0, Geometry geom1, int opCode)
-  {
-    OverlayOp gov = new OverlayOp(geom0, geom1);
-    Geometry geomOv = gov.getResultGeometry(opCode);
-    return geomOv;
-  }
-
-  public static boolean isResultOfOp(Label label, int opCode)
-  {
-    int loc0 = label.getLocation(0);
-    int loc1 = label.getLocation(1);
-    return isResultOfOp(loc0, loc1, opCode);
-  }
-
-  /**
-   * This method will handle arguments of Location.NONE correctly
-   *
-   * @return true if the locations correspond to the opCode
-   */
-  public static boolean isResultOfOp(int loc0, int loc1, int opCode)
-  {
-    if (loc0 == Location.BOUNDARY) loc0 = Location.INTERIOR;
-    if (loc1 == Location.BOUNDARY) loc1 = Location.INTERIOR;
-    switch (opCode) {
-    case INTERSECTION:
-      return loc0 == Location.INTERIOR
-          && loc1 == Location.INTERIOR;
-    case UNION:
-      return loc0 == Location.INTERIOR
-          || loc1 == Location.INTERIOR;
-    case DIFFERENCE:
-      return loc0 == Location.INTERIOR
-          && loc1 != Location.INTERIOR;
-    case SYMDIFFERENCE:
-      return   (     loc0 == Location.INTERIOR &&  loc1 != Location.INTERIOR)
-            || (     loc0 != Location.INTERIOR &&  loc1 == Location.INTERIOR);
-    }
-    return false;
-  }
-
-  private final PointLocator ptLocator = new PointLocator();
-  private GeometryFactory geomFact;
-  private Geometry resultGeom;
-
-  private PlanarGraph graph;
-  private EdgeList edgeList     = new EdgeList();
-
-  private List resultPolyList   = new ArrayList();
-  private List resultLineList   = new ArrayList();
-  private List resultPointList  = new ArrayList();
-
-  public OverlayOp(Geometry g0, Geometry g1) {
-    super(g0, g1);
-    graph = new PlanarGraph(new OverlayNodeFactory());
-    /**
-     * Use factory of primary geometry.
-     * Note that this does NOT handle mixed-precision arguments
-     * where the second arg has greater precision than the first.
-     */
-    geomFact = g0.getFactory();
-  }
-
-  public Geometry getResultGeometry(int funcCode)
-  {
-    computeOverlay(funcCode);
-    return resultGeom;
-  }
-
-  public PlanarGraph getGraph() { return graph; }
-
-  private void computeOverlay(int opCode)
-  {
-    // copy points from input Geometries.
-    // This ensures that any Point geometries
-    // in the input are considered for inclusion in the result set
-    copyPoints(0);
-    copyPoints(1);
-
-    // node the input Geometries
-    arg[0].computeSelfNodes(li, false);
-    arg[1].computeSelfNodes(li, false);
-
-    // compute intersections between edges of the two input geometries
-    arg[0].computeEdgeIntersections(arg[1], li, true);
-
-    List baseSplitEdges = new ArrayList();
-    arg[0].computeSplitEdges(baseSplitEdges);
-    arg[1].computeSplitEdges(baseSplitEdges);
-    // add the noded edges to this result graph
-    insertUniqueEdges(baseSplitEdges);
-
-    computeLabelsFromDepths();
-    replaceCollapsedEdges();
-
-//Debug.println(edgeList);
-
-    /**
-     * Check that the noding completed correctly.
-     * 
-     * This test is slow, but necessary in order to catch robustness failure 
-     * situations.
-     * If an exception is thrown because of a noding failure, 
-     * then snapping will be performed, which will hopefully avoid the problem.
-     * In the future hopefully a faster check can be developed.  
-     * 
-     */
-    EdgeNodingValidator.checkValid(edgeList.getEdges());
-
-    graph.addEdges(edgeList.getEdges());
-    computeLabelling();
-//Debug.printWatch();
-    labelIncompleteNodes();
-//Debug.printWatch();
-//nodeMap.print(System.out);
-
-    /**
-     * The ordering of building the result Geometries is important.
-     * Areas must be built before lines, which must be built before points.
-     * This is so that lines which are covered by areas are not included
-     * explicitly, and similarly for points.
-     */
-    findResultAreaEdges(opCode);
-    cancelDuplicateResultEdges();
-
-    PolygonBuilder polyBuilder = new PolygonBuilder(geomFact);
-    polyBuilder.add(graph);
-    resultPolyList = polyBuilder.getPolygons();
-
-    LineBuilder lineBuilder = new LineBuilder(this, geomFact);
-    resultLineList = lineBuilder.build(opCode);
-
-    PointBuilder pointBuilder = new PointBuilder(this, geomFact);
-    resultPointList = pointBuilder.build(opCode);
-
-    // gather the results from all calculations into a single Geometry for the result set
-    resultGeom = computeGeometry(resultPointList, resultLineList, resultPolyList);
-  }
-
-  private void insertUniqueEdges(List edges)
-  {
-    for (Iterator i = edges.iterator(); i.hasNext(); ) {
-      Edge e = (Edge) i.next();
-      insertUniqueEdge(e);
-    }
-  }
-  /**
-   * Insert an edge from one of the noded input graphs.
-   * Checks edges that are inserted to see if an
-   * identical edge already exists.
-   * If so, the edge is not inserted, but its label is merged
-   * with the existing edge.
-   */
-  protected void insertUniqueEdge(Edge e)
-  {
-//<FIX> MD 8 Oct 03  speed up identical edge lookup
-    // fast lookup
-    Edge existingEdge = edgeList.findEqualEdge(e);
-
-    // If an identical edge already exists, simply update its label
-    if (existingEdge != null) {
-      Label existingLabel = existingEdge.getLabel();
-
-      Label labelToMerge = e.getLabel();
-      // check if new edge is in reverse direction to existing edge
-      // if so, must flip the label before merging it
-      if (! existingEdge.isPointwiseEqual(e)) {
-        labelToMerge = new Label(e.getLabel());
-        labelToMerge.flip();
-      }
-      Depth depth = existingEdge.getDepth();
-      // if this is the first duplicate found for this edge, initialize the depths
-      ///*
-      if (depth.isNull()) {
-        depth.add(existingLabel);
-      }
-      //*/
-      depth.add(labelToMerge);
-      existingLabel.merge(labelToMerge);
-//Debug.print("inserted edge: "); Debug.println(e);
-//Debug.print("existing edge: "); Debug.println(existingEdge);
-
-    }
-    else {  // no matching existing edge was found
-      // add this new edge to the list of edges in this graph
-      //e.setName(name + edges.size());
-      //e.getDepth().add(e.getLabel());
-      edgeList.add(e);
-    }
-  }
-
-  /**
-   * If either of the GeometryLocations for the existing label is
-   * exactly opposite to the one in the labelToMerge,
-   * this indicates a dimensional collapse has happened.
-   * In this case, convert the label for that Geometry to a Line label
-   */
-   /* NOT NEEDED?
-  private void checkDimensionalCollapse(Label labelToMerge, Label existingLabel)
-  {
-    if (existingLabel.isArea() && labelToMerge.isArea()) {
-      for (int i = 0; i < 2; i++) {
-        if (! labelToMerge.isNull(i)
-            &&  labelToMerge.getLocation(i, Position.LEFT)  == existingLabel.getLocation(i, Position.RIGHT)
-            &&  labelToMerge.getLocation(i, Position.RIGHT) == existingLabel.getLocation(i, Position.LEFT) )
-        {
-          existingLabel.toLine(i);
-        }
-      }
-    }
-  }
-  */
-  /**
-   * Update the labels for edges according to their depths.
-   * For each edge, the depths are first normalized.
-   * Then, if the depths for the edge are equal,
-   * this edge must have collapsed into a line edge.
-   * If the depths are not equal, update the label
-   * with the locations corresponding to the depths
-   * (i.e. a depth of 0 corresponds to a Location of EXTERIOR,
-   * a depth of 1 corresponds to INTERIOR)
-   */
-  private void computeLabelsFromDepths()
-  {
-    for (Iterator it = edgeList.iterator(); it.hasNext(); ) {
-      Edge e = (Edge) it.next();
-      Label lbl = e.getLabel();
-      Depth depth = e.getDepth();
-      /**
-       * Only check edges for which there were duplicates,
-       * since these are the only ones which might
-       * be the result of dimensional collapses.
-       */
-      if (! depth.isNull()) {
-        depth.normalize();
-        for (int i = 0; i < 2; i++) {
-          if (! lbl.isNull(i) && lbl.isArea() && ! depth.isNull(i)) {
-          /**
-           * if the depths are equal, this edge is the result of
-           * the dimensional collapse of two or more edges.
-           * It has the same location on both sides of the edge,
-           * so it has collapsed to a line.
-           */
-            if (depth.getDelta(i) == 0) {
-              lbl.toLine(i);
-            }
-            else {
-            /**
-             * This edge may be the result of a dimensional collapse,
-             * but it still has different locations on both sides.  The
-             * label of the edge must be updated to reflect the resultant
-             * side locations indicated by the depth values.
-             */
-              Assert.isTrue(! depth.isNull(i, Position.LEFT), "depth of LEFT side has not been initialized");
-              lbl.setLocation(i, Position.LEFT,   depth.getLocation(i, Position.LEFT));
-              Assert.isTrue(! depth.isNull(i, Position.RIGHT), "depth of RIGHT side has not been initialized");
-              lbl.setLocation(i, Position.RIGHT,  depth.getLocation(i, Position.RIGHT));
-            }
-          }
-        }
-      }
-    }
-  }
-  /**
-   * If edges which have undergone dimensional collapse are found,
-   * replace them with a new edge which is a L edge
-   */
-  private void replaceCollapsedEdges()
-  {
-    List newEdges = new ArrayList();
-    for (Iterator it = edgeList.iterator(); it.hasNext(); ) {
-      Edge e = (Edge) it.next();
-      if (e.isCollapsed()) {
-//Debug.print(e);
-        it.remove();
-        newEdges.add(e.getCollapsedEdge());
-      }
-    }
-    edgeList.addAll(newEdges);
-  }
-  /**
-   * Copy all nodes from an arg geometry into this graph.
-   * The node label in the arg geometry overrides any previously computed
-   * label for that argIndex.
-   * (E.g. a node may be an intersection node with
-   * a previously computed label of BOUNDARY,
-   * but in the original arg Geometry it is actually
-   * in the interior due to the Boundary Determination Rule)
-   */
-  private void copyPoints(int argIndex)
-  {
-    for (Iterator i = arg[argIndex].getNodeIterator(); i.hasNext(); ) {
-      Node graphNode = (Node) i.next();
-      Node newNode = graph.addNode(graphNode.getCoordinate());
-      newNode.setLabel(argIndex, graphNode.getLabel().getLocation(argIndex));
-    }
-  }
-
-  /**
-   * Compute initial labelling for all DirectedEdges at each node.
-   * In this step, DirectedEdges will acquire a complete labelling
-   * (i.e. one with labels for both Geometries)
-   * only if they
-   * are incident on a node which has edges for both Geometries
-   */
-  private void computeLabelling()
-  {
-    for (Iterator nodeit = graph.getNodes().iterator(); nodeit.hasNext(); ) {
-      Node node = (Node) nodeit.next();
-//if (node.getCoordinate().equals(new Coordinate(222, 100)) ) Debug.addWatch(node.getEdges());
-      node.getEdges().computeLabelling(arg);
-    }
-    mergeSymLabels();
-    updateNodeLabelling();
-  }
-  /**
-   * For nodes which have edges from only one Geometry incident on them,
-   * the previous step will have left their dirEdges with no labelling for the other
-   * Geometry.  However, the sym dirEdge may have a labelling for the other
-   * Geometry, so merge the two labels.
-   */
-  private void mergeSymLabels()
-  {
-    for (Iterator nodeit = graph.getNodes().iterator(); nodeit.hasNext(); ) {
-      Node node = (Node) nodeit.next();
-      ((DirectedEdgeStar) node.getEdges()).mergeSymLabels();
-//node.print(System.out);
-    }
-  }
-  private void updateNodeLabelling()
-  {
-    // update the labels for nodes
-    // The label for a node is updated from the edges incident on it
-    // (Note that a node may have already been labelled
-    // because it is a point in one of the input geometries)
-    for (Iterator nodeit = graph.getNodes().iterator(); nodeit.hasNext(); ) {
-      Node node = (Node) nodeit.next();
-      Label lbl = ((DirectedEdgeStar) node.getEdges()).getLabel();
-      node.getLabel().merge(lbl);
-    }
-  }
-
-  /**
-   * Incomplete nodes are nodes whose labels are incomplete.
-   * (e.g. the location for one Geometry is null).
-   * These are either isolated nodes,
-   * or nodes which have edges from only a single Geometry incident on them.
-   *
-   * Isolated nodes are found because nodes in one graph which don't intersect
-   * nodes in the other are not completely labelled by the initial process
-   * of adding nodes to the nodeList.
-   * To complete the labelling we need to check for nodes that lie in the
-   * interior of edges, and in the interior of areas.
-   * <p>
-   * When each node labelling is completed, the labelling of the incident
-   * edges is updated, to complete their labelling as well.
-   */
-  private void labelIncompleteNodes()
-  {
-    for (Iterator ni = graph.getNodes().iterator(); ni.hasNext(); ) {
-      Node n = (Node) ni.next();
-      Label label = n.getLabel();
-      if (n.isIsolated()) {
-        if (label.isNull(0))
-          labelIncompleteNode(n, 0);
-        else
-          labelIncompleteNode(n, 1);
-      }
-      // now update the labelling for the DirectedEdges incident on this node
-      ((DirectedEdgeStar) n.getEdges()).updateLabelling(label);
-//n.print(System.out);
-    }
-    /*
-    int nPoly0 = arg[0].getGeometry().getNumGeometries();
-    int nPoly1 = arg[1].getGeometry().getNumGeometries();
-    System.out.println("# isolated nodes= " + nodeCount 
-    		+ "   # poly[0] = " + nPoly0
-    		+ "   # poly[1] = " + nPoly1);
-    */
-  }
-
-  /**
-   * Label an isolated node with its relationship to the target geometry.
-   */
-  private void labelIncompleteNode(Node n, int targetIndex)
-  {
-    int loc = ptLocator.locate(n.getCoordinate(), arg[targetIndex].getGeometry());
-  	
-  	// MD - 2008-10-24 - experimental for now
-//    int loc = arg[targetIndex].locate(n.getCoordinate());
-    n.getLabel().setLocation(targetIndex, loc);
-  }
-
-  /**
-   * Find all edges whose label indicates that they are in the result area(s),
-   * according to the operation being performed.  Since we want polygon shells to be
-   * oriented CW, choose dirEdges with the interior of the result on the RHS.
-   * Mark them as being in the result.
-   * Interior Area edges are the result of dimensional collapses.
-   * They do not form part of the result area boundary.
-   */
-  private void findResultAreaEdges(int opCode)
-  {
-    for (Iterator it = graph.getEdgeEnds().iterator(); it.hasNext(); ) {
-      DirectedEdge de = (DirectedEdge) it.next();
-    // mark all dirEdges with the appropriate label
-      Label label = de.getLabel();
-      if (label.isArea()
-          && ! de.isInteriorAreaEdge()
-          && isResultOfOp(
-                label.getLocation(0, Position.RIGHT),
-                label.getLocation(1, Position.RIGHT),
-                opCode)) {
-        de.setInResult(true);
-//Debug.print("in result "); Debug.println(de);
-      }
-    }
-  }
-  /**
-   * If both a dirEdge and its sym are marked as being in the result, cancel
-   * them out.
-   */
-  private void cancelDuplicateResultEdges()
-  {
-    // remove any dirEdges whose sym is also included
-    // (they "cancel each other out")
-    for (Iterator it = graph.getEdgeEnds().iterator(); it.hasNext(); ) {
-      DirectedEdge de = (DirectedEdge) it.next();
-      DirectedEdge sym = de.getSym();
-      if (de.isInResult() && sym.isInResult()) {
-        de.setInResult(false);
-        sym.setInResult(false);
-//Debug.print("cancelled "); Debug.println(de); Debug.println(sym);
-      }
-    }
-  }
-  /**
-   * This method is used to decide if a point node should be included in the result or not.
-   *
-   * @return true if the coord point is covered by a result Line or Area geometry
-   */
-  public boolean isCoveredByLA(Coordinate coord)
-  {
-    if (isCovered(coord, resultLineList)) return true;
-    if (isCovered(coord, resultPolyList)) return true;
-    return false;
-  }
-  /**
-   * This method is used to decide if an L edge should be included in the result or not.
-   *
-   * @return true if the coord point is covered by a result Area geometry
-   */
-  public boolean isCoveredByA(Coordinate coord)
-  {
-    if (isCovered(coord, resultPolyList)) return true;
-    return false;
-  }
-  /**
-   * @return true if the coord is located in the interior or boundary of
-   * a geometry in the list.
-   */
-  private boolean isCovered(Coordinate coord, List geomList)
-  {
-    for (Iterator it = geomList.iterator(); it.hasNext(); ) {
-      Geometry geom = (Geometry) it.next();
-      int loc = ptLocator.locate(coord, geom);
-      if (loc != Location.EXTERIOR) return true;
-    }
-    return false;
-  }
-
-  private Geometry computeGeometry( List resultPointList,
-                                        List resultLineList,
-                                        List resultPolyList
-                                        )
-  {
-    List geomList = new ArrayList();
-    // element geometries of the result are always in the order P,L,A
-    geomList.addAll(resultPointList);
-    geomList.addAll(resultLineList);
-    geomList.addAll(resultPolyList);
-    
-    /*
-    if (geomList.isEmpty())
-    	return createEmptyResult(opcode);
-    */
-    
-    // build the most specific geometry possible
-    return geomFact.buildGeometry(geomList);
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/PointBuilder.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/PointBuilder.java	(revision 28245)
+++ 	(revision )
@@ -1,131 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.operation.overlay;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.GeometryFactory;
-import com.vividsolutions.jts.geom.Point;
-import com.vividsolutions.jts.geomgraph.Label;
-import com.vividsolutions.jts.geomgraph.Node;
-
-/**
- * Constructs {@link Point}s from the nodes of an overlay graph.
- * @version 1.7
- */
-public class PointBuilder {
-  private OverlayOp op;
-  private GeometryFactory geometryFactory;
-  private List resultPointList = new ArrayList();
-
-  public PointBuilder(OverlayOp op, GeometryFactory geometryFactory) {
-    this.op = op;
-    this.geometryFactory = geometryFactory;
-    // ptLocator is never used in this class
-  }
-
-  /**
-   * Computes the Point geometries which will appear in the result,
-   * given the specified overlay operation.
-   *
-   * @return a list of the Points objects in the result
-   */
-  public List build(int opCode)
-  {
-    extractNonCoveredResultNodes(opCode);
-    /**
-     * It can happen that connected result nodes are still covered by
-     * result geometries, so must perform this filter.
-     * (For instance, this can happen during topology collapse).
-     */
-    return resultPointList;
-  }
-
-  /**
-   * Determines nodes which are in the result, and creates {@link Point}s for them.
-   *
-   * This method determines nodes which are candidates for the result via their
-   * labelling and their graph topology.
-   *
-   * @param opCode the overlay operation
-   */
-  private void extractNonCoveredResultNodes(int opCode)
-  {
-    // testing only
-    //if (true) return resultNodeList;
-
-    for (Iterator nodeit = op.getGraph().getNodes().iterator(); nodeit.hasNext(); ) {
-      Node n = (Node) nodeit.next();
-
-      // filter out nodes which are known to be in the result
-      if (n.isInResult())
-        continue;
-      // if an incident edge is in the result, then the node coordinate is included already
-      if (n.isIncidentEdgeInResult())
-        continue;
-      if (n.getEdges().getDegree() == 0 || opCode == OverlayOp.INTERSECTION) {
-
-        /**
-         * For nodes on edges, only INTERSECTION can result in edge nodes being included even
-         * if none of their incident edges are included
-         */
-          Label label = n.getLabel();
-          if (OverlayOp.isResultOfOp(label, opCode)) {
-            filterCoveredNodeToPoint(n);
-          }
-      }
-    }
-    //System.out.println("connectedResultNodes collected = " + connectedResultNodes.size());
-  }
-
-  /**
-   * Converts non-covered nodes to Point objects and adds them to the result.
-   *
-   * A node is covered if it is contained in another element Geometry
-   * with higher dimension (e.g. a node point might be contained in a polygon,
-   * in which case the point can be eliminated from the result).
-   *
-   * @param n the node to test
-   */
-  private void filterCoveredNodeToPoint(Node n)
-  {
-    Coordinate coord = n.getCoordinate();
-    if (! op.isCoveredByLA(coord)) {
-      Point pt = geometryFactory.createPoint(coord);
-      resultPointList.add(pt);
-    }
-  }
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/PolygonBuilder.java
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/PolygonBuilder.java	(revision 28245)
+++ 	(revision )
@@ -1,286 +1,0 @@
-/*
- * The JTS Topology Suite is a collection of Java classes that
- * implement the fundamental operations required to validate a given
- * geo-spatial data set to a known topological specification.
- *
- * Copyright (C) 2001 Vivid Solutions
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * For more information, contact:
- *
- *     Vivid Solutions
- *     Suite #1A
- *     2328 Government Street
- *     Victoria BC  V8T 5G5
- *     Canada
- *
- *     (250)385-6040
- *     www.vividsolutions.com
- */
-package com.vividsolutions.jts.operation.overlay;
-
-import java.util.*;
-import com.vividsolutions.jts.geom.*;
-import com.vividsolutions.jts.algorithm.*;
-import com.vividsolutions.jts.geomgraph.*;
-import com.vividsolutions.jts.util.*;
-
-/**
- * Forms {@link Polygon}s out of a graph of {@link DirectedEdge}s.
- * The edges to use are marked as being in the result Area.
- * <p>
- *
- * @version 1.7
- */
-public class PolygonBuilder {
-
-  private GeometryFactory geometryFactory;
-  //private List dirEdgeList;
-  //private NodeMap nodes;
-  private List shellList        = new ArrayList();
-
-  public PolygonBuilder(GeometryFactory geometryFactory)
-  {
-    this.geometryFactory = geometryFactory;
-  }
-
-  /**
-   * Add a complete graph.
-   * The graph is assumed to contain one or more polygons,
-   * possibly with holes.
-   */
-  public void add(PlanarGraph graph)
-  {
-    add(graph.getEdgeEnds(), graph.getNodes());
-  }
-
-  /**
-   * Add a set of edges and nodes, which form a graph.
-   * The graph is assumed to contain one or more polygons,
-   * possibly with holes.
-   */
-  public void add(Collection dirEdges, Collection nodes)
-  {
-    PlanarGraph.linkResultDirectedEdges(nodes);
-    List maxEdgeRings = buildMaximalEdgeRings(dirEdges);
-    List freeHoleList = new ArrayList();
-    List edgeRings = buildMinimalEdgeRings(maxEdgeRings, shellList, freeHoleList);
-    sortShellsAndHoles(edgeRings, shellList, freeHoleList);
-    placeFreeHoles(shellList, freeHoleList);
-    //Assert: every hole on freeHoleList has a shell assigned to it
-  }
-
-  public List getPolygons()
-  {
-    List resultPolyList = computePolygons(shellList);
-    return resultPolyList;
-  }
-
-
-  /**
-   * for all DirectedEdges in result, form them into MaximalEdgeRings
-   */
-  private List buildMaximalEdgeRings(Collection dirEdges)
-  {
-    List maxEdgeRings     = new ArrayList();
-    for (Iterator it = dirEdges.iterator(); it.hasNext(); ) {
-      DirectedEdge de = (DirectedEdge) it.next();
-      if (de.isInResult() && de.getLabel().isArea() ) {
-        // if this edge has not yet been processed
-        if (de.getEdgeRing() == null) {
-          MaximalEdgeRing er = new MaximalEdgeRing(de, geometryFactory);
-          maxEdgeRings.add(er);
-          er.setInResult();
-//System.out.println("max node degree = " + er.getMaxDegree());
-        }
-      }
-    }
-    return maxEdgeRings;
-  }
-
-  private List buildMinimalEdgeRings(List maxEdgeRings, List shellList, List freeHoleList)
-  {
-    List edgeRings = new ArrayList();
-    for (Iterator it = maxEdgeRings.iterator(); it.hasNext(); ) {
-      MaximalEdgeRing er = (MaximalEdgeRing) it.next();
-      if (er.getMaxNodeDegree() > 2) {
-        er.linkDirectedEdgesForMinimalEdgeRings();
-        List minEdgeRings = er.buildMinimalRings();
-        // at this point we can go ahead and attempt to place holes, if this EdgeRing is a polygon
-        EdgeRing shell = findShell(minEdgeRings);
-        if (shell != null) {
-          placePolygonHoles(shell, minEdgeRings);
-          shellList.add(shell);
-        }
-        else {
-          freeHoleList.addAll(minEdgeRings);
-        }
-      }
-      else {
-        edgeRings.add(er);
-      }
-    }
-    return edgeRings;
-  }
-
-  /**
-   * This method takes a list of MinimalEdgeRings derived from a MaximalEdgeRing,
-   * and tests whether they form a Polygon.  This is the case if there is a single shell
-   * in the list.  In this case the shell is returned.
-   * The other possibility is that they are a series of connected holes, in which case
-   * no shell is returned.
-   *
-   * @return the shell EdgeRing, if there is one
-   * @return null, if all the rings are holes
-   */
-  private EdgeRing findShell(List minEdgeRings)
-  {
-    int shellCount = 0;
-    EdgeRing shell = null;
-    for (Iterator it = minEdgeRings.iterator(); it.hasNext(); ) {
-      EdgeRing er = (MinimalEdgeRing) it.next();
-      if (! er.isHole()) {
-        shell = er;
-        shellCount++;
-      }
-    }
-    Assert.isTrue(shellCount <= 1, "found two shells in MinimalEdgeRing list");
-    return shell;
-  }
-  /**
-   * This method assigns the holes for a Polygon (formed from a list of
-   * MinimalEdgeRings) to its shell.
-   * Determining the holes for a MinimalEdgeRing polygon serves two purposes:
-   * <ul>
-   * <li>it is faster than using a point-in-polygon check later on.
-   * <li>it ensures correctness, since if the PIP test was used the point
-   * chosen might lie on the shell, which might return an incorrect result from the
-   * PIP test
-   * </ul>
-   */
-  private void placePolygonHoles(EdgeRing shell, List minEdgeRings)
-  {
-    for (Iterator it = minEdgeRings.iterator(); it.hasNext(); ) {
-      MinimalEdgeRing er = (MinimalEdgeRing) it.next();
-      if (er.isHole()) {
-        er.setShell(shell);
-      }
-    }
-  }
-  /**
-   * For all rings in the input list,
-   * determine whether the ring is a shell or a hole
-   * and add it to the appropriate list.
-   * Due to the way the DirectedEdges were linked,
-   * a ring is a shell if it is oriented CW, a hole otherwise.
-   */
-  private void sortShellsAndHoles(List edgeRings, List shellList, List freeHoleList)
-  {
-    for (Iterator it = edgeRings.iterator(); it.hasNext(); ) {
-      EdgeRing er = (EdgeRing) it.next();
-//      er.setInResult();
-      if (er.isHole() ) {
-        freeHoleList.add(er);
-      }
-      else {
-        shellList.add(er);
-      }
-    }
-  }
-  /**
-   * This method determines finds a containing shell for all holes
-   * which have not yet been assigned to a shell.
-   * These "free" holes should
-   * all be <b>properly</b> contained in their parent shells, so it is safe to use the
-   * <code>findEdgeRingContaining</code> method.
-   * (This is the case because any holes which are NOT
-   * properly contained (i.e. are connected to their
-   * parent shell) would have formed part of a MaximalEdgeRing
-   * and been handled in a previous step).
-   *
-   * @throws TopologyException if a hole cannot be assigned to a shell
-   */
-  private void placeFreeHoles(List shellList, List freeHoleList)
-  {
-    for (Iterator it = freeHoleList.iterator(); it.hasNext(); ) {
-      EdgeRing hole = (EdgeRing) it.next();
-      // only place this hole if it doesn't yet have a shell
-      if (hole.getShell() == null) {
-        EdgeRing shell = findEdgeRingContaining(hole, shellList);
-        if (shell == null)
-          throw new TopologyException("unable to assign hole to a shell", hole.getCoordinate(0));
-//        Assert.isTrue(shell != null, "unable to assign hole to a shell");
-        hole.setShell(shell);
-      }
-    }
-  }
-
-  /**
-   * Find the innermost enclosing shell EdgeRing containing the argument EdgeRing, if any.
-   * The innermost enclosing ring is the <i>smallest</i> enclosing ring.
-   * The algorithm used depends on the fact that:
-   * <br>
-   *  ring A contains ring B iff envelope(ring A) contains envelope(ring B)
-   * <br>
-   * This routine is only safe to use if the chosen point of the hole
-   * is known to be properly contained in a shell
-   * (which is guaranteed to be the case if the hole does not touch its shell)
-   *
-   * @return containing EdgeRing, if there is one
-   * @return null if no containing EdgeRing is found
-   */
-  private EdgeRing findEdgeRingContaining(EdgeRing testEr, List shellList)
-  {
-    LinearRing testRing = testEr.getLinearRing();
-    Envelope testEnv = testRing.getEnvelopeInternal();
-    Coordinate testPt = testRing.getCoordinateN(0);
-
-    EdgeRing minShell = null;
-    Envelope minEnv = null;
-    for (Iterator it = shellList.iterator(); it.hasNext(); ) {
-      EdgeRing tryShell = (EdgeRing) it.next();
-      LinearRing tryRing = tryShell.getLinearRing();
-      Envelope tryEnv = tryRing.getEnvelopeInternal();
-      if (minShell != null) minEnv = minShell.getLinearRing().getEnvelopeInternal();
-      boolean isContained = false;
-      if (tryEnv.contains(testEnv)
-          && CGAlgorithms.isPointInRing(testPt, tryRing.getCoordinates()) )
-        isContained = true;
-      // check if this new containing ring is smaller than the current minimum ring
-      if (isContained) {
-        if (minShell == null
-            || minEnv.contains(tryEnv)) {
-          minShell = tryShell;
-        }
-      }
-    }
-    return minShell;
-  }
-  private List computePolygons(List shellList)
-  {
-    List resultPolyList   = new ArrayList();
-    // add Polygons for all shells
-    for (Iterator it = shellList.iterator(); it.hasNext(); ) {
-      EdgeRing er = (EdgeRing) it.next();
-      Polygon poly = er.toPolygon(geometryFactory);
-      resultPolyList.add(poly);
-    }
-    return resultPolyList;
-  }
-
-
-
-}
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/package.html
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/overlay/package.html	(revision 28245)
+++ 	(revision )
@@ -1,41 +1,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
-
--->
-</head>
-<body bgcolor="white">
-
-Contains classes that perform a topological overlay to compute boolean spatial functions.
-<P>
-The Overlay Algorithm is used in spatial analysis methods for computing set-theoretic 
-operations (boolean combinations) of input {@link Geometry}s. The algorithm for 
-computing the overlay uses the intersection operations supported by topology graphs.  
-To compute an overlay it is necessary to explicitly compute the resultant graph formed 
-by the computed intersections.
-<P>
-The algorithm to compute a set-theoretic spatial analysis method has the following steps:
-<UL>
-  <LI>Build topology graphs of the two input geometries.  For each geometry all 
-      self-intersection nodes are computed and added to the graph.
-  <LI>Compute nodes for all intersections between edges and nodes of the graphs.
-  <LI>Compute the labeling for the computed nodes by merging the labels from the input graphs. 
-  <LI>Compute new edges between the compute intersection nodes.  Label the edges appropriately.
-  <LI>Build the resultant graph from the new nodes and edges.
-  <LI>Compute the labeling for isolated components of the graph.  Add the 
-      isolated components to the resultant graph.
-  <LI>Compute the result of the boolean combination by selecting the node and edges 
-      with the appropriate labels. Polygonize areas and sew linear geometries together.
-</UL>
-
-<h2>Package Specification</h2>
-
-<ul>
-  <li>Java Topology Suite Technical Specifications
-  <li><A HREF="http://www.opengis.org/techno/specs.htm">
-      OpenGIS Simple Features Specification for SQL</A>
-</ul>
-
-</body>
-</html>
Index: applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/package.html
===================================================================
--- applications/editors/josm/plugins/opendata/includes/com/vividsolutions/jts/operation/package.html	(revision 28245)
+++ 	(revision )
@@ -1,13 +1,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
-
--->
-</head>
-<body bgcolor="white">
-
-Provides classes for implementing operations on geometries
-
-</body>
-</html>
Index: applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java
===================================================================
--- applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java	(revision 28245)
+++ applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java	(revision 28246)
@@ -66,5 +66,5 @@
 	private static OdPlugin instance;
 	
-	public final XmlImporter xmlImporter;
+	public final XmlImporter xmlImporter = new XmlImporter();
 	
 	private final JMenu menu;
@@ -82,5 +82,5 @@
 				new KmlKmzImporter(), new ShpImporter(), new MifTabImporter(), new GmlImporter(), // Geographic file formats
 				new ZipImporter(), // Archive containing any of the others
-				xmlImporter = new XmlImporter() // Generic importer for XML files (currently used for Neptune files)
+				xmlImporter // Generic importer for XML files (currently used for Neptune files)
 		})) {
 			ExtensionFileFilter.importers.add(0, importer);
