code: private static boolean relate(Point point_a, Envelope envelope_b,
  			SpatialReference sr, int relation, ProgressTracker progress_tracker) {
  		if (point_a.isEmpty() || envelope_b.isEmpty()) {
  			if (relation == Relation.disjoint)
  				return true; // Always true
  
  			return false; // Always false
  		}
  
  		Point2D pt_a = point_a.getXY();
  		Envelope2D env_b = new Envelope2D(), env_merged = new Envelope2D();
  		envelope_b.queryEnvelope2D(env_b);
  		env_merged.setCoords(pt_a);
  		env_merged.merge(env_b);
  
  		double tolerance = InternalUtils.calculateToleranceFromGeometry(sr,
  				env_merged, false);
  
  		switch (relation) {
  		case Relation.disjoint:
  			return pointDisjointEnvelope_(pt_a, env_b, tolerance,
  					progress_tracker);
  
  		case Relation.within:
  			return pointWithinEnvelope_(pt_a, env_b, tolerance,
  					progress_tracker);
  
  		case Relation.contains:
  			return pointContainsEnvelope_(pt_a, env_b, tolerance,
  					progress_tracker);
  
  		case Relation.equals:
  			return pointEqualsEnvelope_(pt_a, env_b, tolerance,
  					progress_tracker);
  
  		case Relation.touches:
  			return pointTouchesEnvelope_(pt_a, env_b, tolerance,
  					progress_tracker);
  
  		default:
  			break; // warning fix
  		}
  
  		return false;
  	}
docs: interior, and exterior of point_a vs envelope_b for the given relation.