docs: private static boolean envelopeTouchesEnvelope_(Envelope2D env_a,
  			Envelope2D env_b, double tolerance, ProgressTracker progress_tracker) {
  		if (env_a.getHeight() <= tolerance && env_a.getWidth() <= tolerance) {// treat
  																				// env_a
  																				// as
  																				// point
  			Point2D pt_a = env_a.getCenter();
  			return pointTouchesEnvelope_(pt_a, env_b, tolerance,
  					progress_tracker);
  		}
  
  		if (env_b.getHeight() <= tolerance && env_b.getWidth() <= tolerance) {// treat
  																				// env_b
  																				// as
  																				// point
  			Point2D pt_b = env_b.getCenter();
  			return pointTouchesEnvelope_(pt_b, env_a, tolerance,
  					progress_tracker);
  		}
  
  		Envelope2D _env_a;
  		Envelope2D _env_b;
  
  		if (env_a.getHeight() > tolerance
  				&& env_a.getWidth() > tolerance
  				&& (env_b.getHeight() <= tolerance || env_b.getWidth() <= tolerance)) {
  			// swap a and b
  			_env_a = env_b;
  			_env_b = env_a;
  		} else {
  			_env_a = env_a;
  			_env_b = env_b;
  		}
  
  		if (_env_a.getHeight() <= tolerance || _env_a.getWidth() <= tolerance) {// treat
  																				// env_a
  																				// as
  																				// line
  
  			if (_env_b.getHeight() <= tolerance
  					|| _env_b.getWidth() <= tolerance) {// treat env_b as line
  
  				Line line_a = new Line(), line_b = new Line();
  				double[] scalars_a = new double[2];
  				double[] scalars_b = new double[2];
  				Point2D pt = new Point2D();
  				_env_a.queryLowerLeft(pt);
  				line_a.setStartXY(pt);
  				_env_a.queryUpperRight(pt);
  				line_a.setEndXY(pt);
  				_env_b.queryLowerLeft(pt);
  				line_b.setStartXY(pt);
  				_env_b.queryUpperRight(pt);
  				line_b.setEndXY(pt);
  
  				line_a.intersect(line_b, null, scalars_a, scalars_b, tolerance);
  				int count = line_a.intersect(line_b, null, null, null,
  						tolerance);
  
  				if (count != 1)
  					return false;
  
  				return scalars_a[0] == 0.0 || scalars_a[1] == 1.0
  						|| scalars_b[0] == 0.0 || scalars_b[1] == 1.0;
  			}
  
  			// treat env_b as area
  
  			Envelope2D env_b_deflated = new Envelope2D(), env_inter = new Envelope2D();
  			env_b_deflated.setCoords(_env_b);
  			env_b_deflated.inflate(-tolerance, -tolerance);
  			env_inter.setCoords(env_b_deflated);
  			env_inter.intersect(_env_a);
  
  			if (!env_inter.isEmpty()
  					&& (env_inter.getHeight() > tolerance || env_inter
  							.getWidth() > tolerance))
  				return false;
  
  			assert (!envelopeDisjointEnvelope_(_env_a, _env_b, tolerance,
  					progress_tracker));
  			return true; // we already know they intersect within a tolerance
  		}
  
  		Envelope2D env_inter = new Envelope2D();
  		env_inter.setCoords(_env_a);
  		env_inter.intersect(_env_b);
  
  		if (!env_inter.isEmpty() && env_inter.getHeight() > tolerance
  				&& env_inter.getWidth() > tolerance)
  			return false;
  
  		return true; // we already know they intersect within a tolerance
  	}