code: private static boolean envelopeContainsEnvelope_(Envelope2D env_a,
  			Envelope2D env_b, double tolerance, ProgressTracker progress_tracker) {
  		if (!envelopeInfContainsEnvelope_(env_a, env_b, tolerance))
  			return false;
  
  		if (env_a.getHeight() <= tolerance && env_a.getWidth() <= tolerance) {
  			Point2D pt_a = env_a.getCenter();
  			return pointWithinEnvelope_(pt_a, env_b, tolerance,
  					progress_tracker);
  		}
  
  		if (env_b.getHeight() <= tolerance && env_b.getWidth() <= tolerance) {
  			Point2D pt_b = env_b.getCenter();
  			return pointWithinEnvelope_(pt_b, env_a, tolerance,
  					progress_tracker);
  		}
  
  		if (env_a.getHeight() <= tolerance || env_a.getWidth() <= tolerance)
  			return envelopeInfContainsEnvelope_(env_a, env_b, tolerance); // treat
  																			// env_b
  																			// as
  																			// line
  
  		// treat env_a as area
  
  		if (env_b.getHeight() <= tolerance || env_b.getWidth() <= tolerance) {// treat
  																				// env_b
  																				// as
  																				// line
  
  			Envelope2D env_a_deflated = new Envelope2D();
  			env_a_deflated.setCoords(env_a);
  			env_a_deflated.inflate(-tolerance, -tolerance);
  
  			if (env_a_deflated.containsExclusive(env_b))
  				return true;
  
  			Envelope2D env_inter = new Envelope2D();
  			env_inter.setCoords(env_a_deflated);
  			env_inter.intersect(env_b);
  
  			if (env_inter.isEmpty()
  					|| (env_inter.getHeight() <= tolerance && env_inter
  							.getWidth() <= tolerance))
  				return false;
  
  			return true;
  		}
  
  		return envelopeInfContainsEnvelope_(env_a, env_b, tolerance);
  	}
docs: Returns true if env_a contains env_b.